code: def test_connected_double_edge_swap_star():
      # Testing ui==xi in connected_double_edge_swap
      graph = nx.star_graph(40)
      degrees = sorted(d for n, d in graph.degree())
      G = nx.connected_double_edge_swap(graph, 1, seed=4)
      assert nx.is_connected(graph)
      assert degrees == sorted(d for n, d in graph.degree())
  
imports: import pytest
  import networkx
label_desc: Use image node_id 7 for calling a global function with example usage: test_connected_double_edge_swap_star() without return types