def METHOD_NAME(
    goals: List[Dict], turnDict: List[Dict], permissive=False
) -> (AverageMetric, AverageMetric, AverageMetric):
    """
    Helper function that aids in seeing if the API calls the system has attempted to
    make manages to meet the goals the conversation has.
    Return values:
    * if all goals hit
    * # of turns it took to hit all goals (or None)
    * fraction of goals hit
    """
    goals_left = goals
    def exact_match(goal, turn):  # if and only if
        return goal == turn
    def permissive_match(goal, turn):  # guess is superset
        for key in goal:
            if turn.get(key, "definitelyNotIn") != goal[key]:
                return False
        return True
    compare_func = permissive_match if permissive else exact_match
    for i, turn in enumerate(turnDict):
        goals_left = [goal for goal in goals_left if not compare_func(goal, turn)]
        if len(goals_left) == 0:
            return AverageMetric(True), AverageMetric(i + 1), AverageMetric(1)
    return (
        AverageMetric(False),
        AverageMetric(0),
        AverageMetric(len(goals) - len(goals_left), len(goals)),
    )