def _lg_directed(G, create_using=None):
 if (create_using is None):
  L = G.__class__()
 else:
  L = create_using
 get_edges = _edge_func(G)
 for from_node in get_edges():
  L.add_node(from_node)
  for to_node in get_edges(from_node[1]):
   L.add_edge(from_node, to_node)
 return L

def _lg_directed ( G , create_using = None ) : if ( create_using is None ) : L = G . __class__ ( ) else : L = create_using get_edges = _edge_func ( G ) for from_node in get_edges ( ) : L . add_node ( from_node ) for to_node in get_edges ( from_node [ 1 ] ) : L . add_edge ( from_node , to_node ) return L
return the line graph l of the digraph g .