def inner_DFS(digr, node, node_explored, finishing_times):
 node_explored.add(node)
 for each in digr.neighbors(node):
  if (each not in node_explored):
   inner_DFS(digr, each, node_explored, finishing_times)
 global finishing_counter
 finishing_times.append(node)

def inner_DFS ( digr , node , node_explored , finishing_times ) : node_explored . add ( node ) for each in digr . neighbors ( node ) : if ( each not in node_explored ) : inner_DFS ( digr , each , node_explored , finishing_times ) global finishing_counter finishing_times . append ( node )
inner dfs used in dfs loop method .