def check_old_policy(policy):
    """
    Checks the validity of a single policy using the
    rules from part 1 of day 2.
    """
    letter_count = policy["passwd"].count(policy["letter"])
    result = dict(policy)
    result["valid"] = policy["low"] <= letter_count <= policy["high"]

    return result