<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_transitive_dependencies( collected: Set[str], dep_graph: DepGraph, from_name: str ) -> None: """Collect transitive dependencies. From a dependency graph, collects a list of transitive dependencies by recursing through a dependency graph. """

    immediate_deps = dep_graph[from_name]
    for to_name in immediate_deps:
        if to_name not in collected:
            collected.add(to_name)
            collect_transitive_dependencies(collected, dep_graph, to_name)