original_docstring: Returns a connected ws-flex graph.
      
docstring: Returns a connected ws-flex graph.
docstring_tokens: Returns a connected ws - flex graph .
code: def connected_ws_graph(n, k, p, tries=100, seed=1):
      """Returns a connected ws-flex graph.
      """
      for i in range(tries):
          # seed is an RNG so should change sequence each call
          G = ws_graph(n, k, p, seed)
          if nx.is_connected(G):
              return G
      raise nx.NetworkXError('Maximum number of tries exceeded')
code_tokens: def connected_ws_graph ( n , k , p , tries = 100 , seed = 1 ) : for i in range ( tries ) : G = ws_graph ( n , k , p , seed ) if nx . is_connected ( G ) : return G raise nx . NetworkXError ( 'Maximum number of tries exceeded' )
short_docstring: Returns a connected ws-flex graph.
short_docstring_tokens: Returns a connected ws - flex graph .
comment: """Returns a connected ws-flex graph.
      """$SEP$# seed is an RNG so should change sequence each call