def generate_scale_free_graph(steps, growth_num, self_loops=False, multi_edges=False):
 graph = Graph.Graph()
 store = []
 for i in range(growth_num):
  for j in range((i + 1), growth_num):
   store.append(i)
   store.append(j)
   graph.add_edge(i, j)
 for node in range(growth_num, (steps * growth_num)):
  graph.add_node(node)
  while (graph.out_degree(node) < growth_num):
   nbr = random.choice(store)
   if ((node == nbr) and (not self_loops)):
    continue
   if (graph.edge_by_node(node, nbr) and (not multi_edges)):
    continue
   graph.add_edge(node, nbr)
  for nbr in graph.out_nbrs(node):
   store.append(node)
   store.append(nbr)
 return graph

def generate_scale_free_graph ( steps , growth_num , self_loops = False , multi_edges = False ) : graph = Graph . Graph ( ) store = [ ] for i in range ( growth_num ) : for j in range ( ( i + 1 ) , growth_num ) : store . append ( i ) store . append ( j ) graph . add_edge ( i , j ) for node in range ( growth_num , ( steps * growth_num ) ) : graph . add_node ( node ) while ( graph . out_degree ( node ) < growth_num ) : nbr = random . choice ( store ) if ( ( node == nbr ) and ( not self_loops ) ) : continue if ( graph . edge_by_node ( node , nbr ) and ( not multi_edges ) ) : continue graph . add_edge ( node , nbr ) for nbr in graph . out_nbrs ( node ) : store . append ( node ) store . append ( nbr ) return graph
generates and returns a :py:class:~altgraph .