networkx.strongly_connected_components_recursive
networkx.topological_sort
Returns list of strongly connected components in G.
Uses Kosaraju’s algorithm.