"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 01:42:49.143156
"""

```python
from typing import List, Dict, Any


class ReasoningEngine:
    """
    A simple reasoning engine that can evaluate conditions based on input data.

    Attributes:
        knowledge_base: A dictionary containing rules and their corresponding actions.
    """

    def __init__(self):
        self.knowledge_base = {}

    def add_rule(self, condition: str, action: Any) -> None:
        """
        Adds a rule to the knowledge base. Each rule is a tuple of a condition string
        and an action callable.

        Args:
            condition (str): A string representing the condition.
            action (Callable): A function that will be executed if the condition is met.
        """
        self.knowledge_base[condition] = action

    def reason(self, data: Dict[str, Any]) -> None:
        """
        Evaluates each rule in the knowledge base against the provided data and executes
        the corresponding actions for those rules which match.

        Args:
            data (Dict[str, Any]): The input data to evaluate the conditions against.
        """
        for condition, action in self.knowledge_base.items():
            if eval(condition, {}, data):
                action(data)


# Example usage

def print_message(message: str) -> None:
    """Print a message"""
    print(message)


def increase_value(value: int) -> int:
    """Increase the value by 10%"""
    return round(value * 1.1)


engine = ReasoningEngine()
engine.add_rule('data["temperature"] > 30', increase_value)
engine.add_rule('data["humidity"] < 40', print_message)

data_example_1 = {"temperature": 32, "humidity": 35}
data_example_2 = {"temperature": 28, "humidity": 39}

print("Example 1:")
engine.reason(data_example_1)  # Should call increase_value

print("\nExample 2:")
engine.reason(data_example_2)  # Should only print the message
```