def compute_dependency_graph(session: c_output.Session, infile: Path, verbose: bool) -> Dict[(CompilationUnit, List[Path])]:
    dependency_graph: Dict[(CompilationUnit, List[Path])] = {}
    queue = [infile]
    while queue:
        source_path = queue.pop()
        if (source_path in (unit.source_path for unit in dependency_graph.keys())):
            continue
        if verbose:
            print('Parsing', source_path)
        candidate_unit = CompilationUnit(source_path, session)
        candidate_unit.create_untyped_ast()
        current_dependencies = [top_declaration.path for top_declaration in candidate_unit.ast if isinstance(top_declaration, ast.Import)]
        if (source_path != (project_root / 'builtins.oomph')):
            current_dependencies.append((project_root / 'builtins.oomph'))
        dependency_graph[candidate_unit] = current_dependencies
        queue.extend(current_dependencies)
    return dependency_graph
def compute_dependency_graph(session: c_output.Session, infile: Path, verbose: bool) -> Dict[(CompilationUnit, List[Path])]:
    dependency_graph: Dict[(CompilationUnit, List[Path])] = {}
    queue = [infile]
    while queue:
        source_path = queue.pop()
        if (source_path in (unit.source_path for unit in dependency_graph.keys())):
            continue
        if verbose:
            print('Parsing', source_path)
        candidate_unit = CompilationUnit(source_path, session)
        candidate_unit.create_untyped_ast()
        current_dependencies = [top_declaration.path for top_declaration in candidate_unit.ast if isinstance(top_declaration, ast.Import)]
        if (source_path != (project_root / 'builtins.oomph')):
            current_dependencies.append((project_root / 'builtins.oomph'))
        dependency_graph[candidate_unit] = current_dependencies
        queue.extend(current_dependencies)
    return dependency_graph