def dfs_successors(G, source=None):
 d = defaultdict(list)
 for (s, t) in dfs_edges(G, source=source):
  d[s].append(t)
 return dict(d)

def dfs_successors ( G , source = None ) : d = defaultdict ( list ) for ( s , t ) in dfs_edges ( G , source = source ) : d [ s ] . append ( t ) return dict ( d )
return dictionary of successors in depth-first-search from source .