code: def test_graph_no_edges(f):
      G = nx.Graph()
      G.add_nodes_from([0, 1, 2, 3])
      with pytest.raises(
          nx.NetworkXError, match="Graph has fewer that 2 edges"
      ):
          f(G)
  
file_path: networkx/networkx/algorithms/tests/test_smallworld.py
imports: import pytest
  import random
  import networkx
  from networkx import lattice_reference, omega, random_reference, sigma
label_desc: Use image node_id 5 for calling a global function with example usage: test_graph_no_edges(f) without return types