def dfs_predecessors(G, source=None):
 return dict(((t, s) for (s, t) in dfs_edges(G, source=source)))

def dfs_predecessors ( G , source = None ) : return dict ( ( ( t , s ) for ( s , t ) in dfs_edges ( G , source = source ) ) )
return dictionary of predecessors in depth-first-search from source .