"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-06 06:24:21.055797
"""

```python
from typing import List, Dict
from random import choice

class FactChecker:
    """
    A simple fact checker that verifies if a given statement is true or false.
    The truthfulness of statements will be determined by randomly selecting from predefined facts.

    Args:
        facts: A list of dictionaries containing key-value pairs where the key is the subject and value is the boolean fact.
               Example: [{'subject': 'apple', 'is_true': True}, {'subject': 'banana', 'is_true': False}]
    """

    def __init__(self, facts: List[Dict[str, bool]]):
        self.facts = facts

    def check_fact(self, subject: str) -> bool:
        """
        Check the fact of a given subject.

        Args:
            subject (str): The subject to check the truthfulness for.

        Returns:
            bool: True if the statement is true, False otherwise.
        """
        matching_facts = [fact for fact in self.facts if fact['subject'] == subject]
        
        if not matching_facts:
            raise ValueError(f"No facts found for the subject {subject}")
        
        # Randomly select a fact for this subject to simulate limited reasoning
        selected_fact = choice(matching_facts)
        return selected_fact['is_true']

# Example usage

if __name__ == "__main__":
    # Define some predefined facts about subjects
    facts = [
        {'subject': 'apple', 'is_true': True},
        {'subject': 'banana', 'is_true': False},
        {'subject': 'orange', 'is_true': True}
    ]

    # Create a fact checker instance with the above facts
    fact_checker = FactChecker(facts)

    # Check if an apple is true (it should be)
    print(f"Is an apple a fruit? {fact_checker.check_fact('apple')}")

    # Check if a banana is false (it should be)
    print(f"Is a banana not a vegetable? {fact_checker.check_fact('banana')}")
```