"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 02:11:35.994761
"""

```python
class ReasoningEngine:
    """
    A basic reasoning engine that performs simple logical operations based on given rules.
    This engine can be extended to handle more complex reasoning tasks.

    :param rules: A list of dictionaries where each dictionary represents a rule with 'condition' and 'action'.
    :type rules: List[Dict[str, Any]]
    """

    def __init__(self, rules):
        self.rules = rules

    def apply_rule(self, condition, data) -> str:
        """
        Apply the first matching rule to the given condition and data.
        
        :param condition: The condition as a string that can be used in eval().
        :type condition: str
        :param data: A dictionary containing all necessary data for evaluating the condition.
        :type data: Dict[str, Any]
        :return: The action from the matched rule or "No rule matches" if no rules apply.
        :rtype: str
        """
        for rule in self.rules:
            try:
                if eval(condition, {}, data):
                    return rule['action']
            except Exception as e:
                print(f"Error evaluating condition {condition}: {e}")
        return "No rule matches"

def example_usage():
    rules = [
        {'condition': 'temperature > 30 and humidity < 50', 'action': 'Turn on the AC'},
        {'condition': 'temperature < 10 or humidity >= 90', 'action': 'Activate heater'}
    ]
    
    engine = ReasoningEngine(rules)
    data = {
        'temperature': 28,
        'humidity': 45
    }
    print(engine.apply_rule('temperature > 30 and humidity < 50', data))
    print(engine.apply_rule('temperature < 10 or humidity >= 90', data))

if __name__ == "__main__":
    example_usage()
```

This Python code defines a simple reasoning engine capable of applying rules based on conditions. The `ReasoningEngine` class can be extended to handle more complex logic and data structures as needed.