code: def kosaraju(graph):
      
      n = len(graph)
      order = []
      sccp = []
      kosaraju_dfs(graph, range(n), order, [])
      kosaraju_dfs(reverse(graph), order[::-1], [], sccp)
      return sccp[::-1]
docs: Strongly connected components by Kosaraju
  
      :param graph: directed graph in listlist format, cannot be listdict
      :returns: list of lists for each component
      :complexity: linear