def __get_cycle(graph, ordering, parent_lookup):
root_node = ordering[<NUM_LIT:0>]<EOL>for i in range(<NUM_LIT:2>, len(ordering)):<EOL><INDENT>current_node = ordering[i]<EOL>if graph.adjacent(current_node, root_node):<EOL><INDENT>path = []<EOL>while current_node != root_node:<EOL><INDENT>path.append(current_node)<EOL>current_node = parent_lookup[current_node]<EOL><DEDENT>path.append(root_node)<EOL>path.reverse()<EOL>return path<EOL><DEDENT><DEDENT>
Gets the main cycle of the dfs tree.