def line_graph(G, create_using=None):
 if G.is_directed():
  L = _lg_directed(G, create_using=create_using)
 else:
  L = _lg_undirected(G, selfloops=False, create_using=create_using)
 return L

def line_graph ( G , create_using = None ) : if G . is_directed ( ) : L = _lg_directed ( G , create_using = create_using ) else : L = _lg_undirected ( G , selfloops = False , create_using = create_using ) return L
returns the line graph of the graph or digraph g .