def full_rary_tree(r, n, create_using=None):
 G = nx.empty_graph(n, create_using)
 G.add_edges_from(_tree_edges(n, r))
 return G

def full_rary_tree ( r , n , create_using = None ) : G = nx . empty_graph ( n , create_using ) G . add_edges_from ( _tree_edges ( n , r ) ) return G
creates a full r-ary tree of n vertices .