def __calculate_adjacency_lists(graph):
adj = {}<EOL>for node in graph.get_all_node_ids():<EOL><INDENT>neighbors = graph.neighbors(node)<EOL>adj[node] = neighbors<EOL><DEDENT>return adj<EOL>
Builds an adjacency list representation for the graph, since we can't guarantee that the
        internal representation of the graph is stored that way.