(nodes: List[ManifestNode])
return _sort_values(forward_edges), _sort_values(backward_edges)
Build the forward and backward edges on the given list of ParsedNodes
    and return them as two separate dictionaries, each mapping unique IDs to
    lists of edges.
Build the forward and backward edges on the given list of ParsedNodes
    and return them as two separate dictionaries, each mapping unique IDs to
    lists of edges.
Build the forward and backward edges on the given list of ParsedNodes and return them as two separate dictionaries each mapping unique IDs to lists of edges .
def build_node_edges(nodes: List[ManifestNode]):
    """Build the forward and backward edges on the given list of ParsedNodes
    and return them as two separate dictionaries, each mapping unique IDs to
    lists of edges.
    """
    backward_edges: Dict[str, List[str]] = {}
    # pre-populate the forward edge dict for simplicity
    forward_edges: Dict[str, List[str]] = {n.unique_id: [] for n in nodes}
    for node in nodes:
        backward_edges[node.unique_id] = node.depends_on_nodes[:]
        for unique_id in node.depends_on_nodes:
            if unique_id in forward_edges.keys():
                forward_edges[unique_id].append(node.unique_id)
    return _sort_values(forward_edges), _sort_values(backward_edges)
def build_node_edges ( nodes : List [ ManifestNode ] ) : backward_edges : Dict [ str , List [ str ] ] = { } # pre-populate the forward edge dict for simplicity forward_edges : Dict [ str , List [ str ] ] = { n . unique_id : [ ] for n in nodes } for node in nodes : backward_edges [ node . unique_id ] = node . depends_on_nodes [ : ] for unique_id in node . depends_on_nodes : if unique_id in forward_edges . keys ( ) : forward_edges [ unique_id ] . append ( node . unique_id ) return _sort_values ( forward_edges ) , _sort_values ( backward_edges )