def union_all(graphs, rename=(None,), name=None):
 graphs_names = zip_longest(graphs, rename)
 (U, gname) = next(graphs_names)
 for (H, hname) in graphs_names:
  U = nx.union(U, H, (gname, hname), name=name)
  gname = None
 return U

def union_all ( graphs , rename = ( None , ) , name = None ) : graphs_names = zip_longest ( graphs , rename ) ( U , gname ) = next ( graphs_names ) for ( H , hname ) in graphs_names : U = nx . union ( U , H , ( gname , hname ) , name = name ) gname = None return U
return the union of all graphs .