from typing import Dict
from typing import Set


def get_allowed_courses(conflict_graph: Dict[str, Set[str]], already_selected: Set[str], prohibited: Set[str]) -> Set[str]:
    """
    Returns the set of courses in course_df that do not conflict with any course names in
    already_selected, according to the graph conflict_graph.
    """
    all_courses = set(conflict_graph.keys())
    prohibited = already_selected.copy().union(prohibited)
    for course in already_selected:
        prohibited = prohibited.union(conflict_graph[course])
    return all_courses.difference(prohibited)