def LCF_graph(n, shift_list, repeats, create_using=None):
 if ((create_using is not None) and create_using.is_directed()):
  raise NetworkXError('Directed Graph not supported')
 if (n <= 0):
  return empty_graph(0, create_using)
 G = cycle_graph(n, create_using)
 G.name = 'LCF_graph'
 nodes = sorted(list(G))
 n_extra_edges = (repeats * len(shift_list))
 if (n_extra_edges < 1):
  return G
 for i in range(n_extra_edges):
  shift = shift_list[(i % len(shift_list))]
  v1 = nodes[(i % n)]
  v2 = nodes[((i + shift) % n)]
  G.add_edge(v1, v2)
 return G

def LCF_graph ( n , shift_list , repeats , create_using = None ) : if ( ( create_using is not None ) and create_using . is_directed ( ) ) : raise NetworkXError ( 'Directed Graph not supported' ) if ( n <= 0 ) : return empty_graph ( 0 , create_using ) G = cycle_graph ( n , create_using ) G . name = 'LCF_graph' nodes = sorted ( list ( G ) ) n_extra_edges = ( repeats * len ( shift_list ) ) if ( n_extra_edges < 1 ) : return G for i in range ( n_extra_edges ) : shift = shift_list [ ( i % len ( shift_list ) ) ] v1 = nodes [ ( i % n ) ] v2 = nodes [ ( ( i + shift ) % n ) ] G . add_edge ( v1 , v2 ) return G
return the cubic graph specified in lcf notation .