code: def _check_connectivity(G, k_components):
      for k, components in k_components.items():
          if k < 3:
              continue
          # check that k-components have node connectivity >= k.
          for component in components:
              C = G.subgraph(component)
              K = nx.node_connectivity(C)
              assert K >= k
  
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 3 for calling a global function with example usage: _check_connectivity(G, k_components) without return types