def connected_caveman_graph(l, k):
 G = nx.caveman_graph(l, k)
 G.name = ('connected_caveman_graph(%s,%s)' % (l, k))
 for start in range(0, (l * k), k):
  G.remove_edge(start, (start + 1))
  G.add_edge(start, ((start - 1) % (l * k)))
 return G

def connected_caveman_graph ( l , k ) : G = nx . caveman_graph ( l , k ) G . name = ( 'connected_caveman_graph(%s,%s)' % ( l , k ) ) for start in range ( 0 , ( l * k ) , k ) : G . remove_edge ( start , ( start + 1 ) ) G . add_edge ( start , ( ( start - 1 ) % ( l * k ) ) ) return G
returns a connected caveman graph of l cliques of size k .