def __sort_adjacency_lists(dfs_data):
new_adjacency_lists = {}<EOL>adjacency_lists = dfs_data['<STR_LIT>']<EOL>edge_weights = dfs_data['<STR_LIT>']<EOL>edge_lookup = dfs_data['<STR_LIT>']<EOL>for node_id, adj_list in list(adjacency_lists.items()):<EOL><INDENT>node_weight_lookup = {}<EOL>frond_lookup = {}<EOL>for node_b in adj_list:<EOL><INDENT>edge_id = dfs_data['<STR_LIT>'].get_first_edge_id_by_node_ids(node_id, node_b)<EOL>node_weight_lookup[node_b] = edge_weights[edge_id]<EOL>frond_lookup[node_b] = <NUM_LIT:1> if edge_lookup[edge_id] == '<STR_LIT>' else <NUM_LIT:2><EOL><DEDENT>new_list = sorted(adj_list, key=lambda n: frond_lookup[n])<EOL>new_list.sort(key=lambda n: node_weight_lookup[n])<EOL>new_adjacency_lists[node_id] = new_list<EOL><DEDENT>return new_adjacency_lists<EOL>
Sorts the adjacency list representation by the edge weights.