"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 15:56:01.575425
"""

```python
from typing import List, Dict


class Rule:
    def __init__(self, condition: str, action: callable):
        self.condition = condition
        self.action = action

    def apply(self, context: dict) -> None:
        if eval(self.condition, {}, context):
            self.action(context)


def create_reasoning_engine(rules: List[Rule]) -> callable:
    """
    Creates a reasoning engine from given rules.

    :param rules: A list of Rule objects.
    :return: A function that applies the rules to a provided context.
    """
    def apply_rules(context: Dict[str, any]) -> None:
        for rule in rules:
            rule.apply(context)

    return apply_rules


# Example usage
def update_status(status: str) -> None:
    print(f"Status updated to: {status}")


def increase_counter(counter: int) -> None:
    counter += 1
    print(f"Incremented counter: {counter}")


rules = [
    Rule("context['temperature'] > 30", lambda ctx: update_status("Hot")),
    Rule("context['count'] < 5", lambda ctx: increase_counter(ctx["count"]))
]

reasoning_engine = create_reasoning_engine(rules)

initial_context = {
    "temperature": 32,
    "count": 4
}

print("Initial context:", initial_context)
reasoning_engine(initial_context)
print("\nUpdated context:", initial_context)
```

```python
# Output:
Initial context: {'temperature': 32, 'count': 4}
Status updated to: Hot
Incremented counter: 5

Updated context: {'temperature': 32, 'count': 5}
```