code: def test_configuration():
      deg_seq = nx.random_powerlaw_tree_sequence(100, tries=5, seed=72)
      G = nx.Graph(nx.configuration_model(deg_seq))
      G.remove_edges_from(nx.selfloop_edges(G))
      result = nx.k_components(G)
      _check_connectivity(G, result)
  
file_path: networkx/networkx/algorithms/connectivity/tests/test_kcomponents.py
imports: import pytest
  import networkx
  from networkx.algorithms.connectivity.kcomponents import _consolidate, build_k_number_dict
label_desc: Use image node_id 7 for calling a global function with example usage: test_configuration() without return types