code: def test_margulis_gabber_galil_graph_properties(n):
      g = nx.margulis_gabber_galil_graph(n)
      assert g.number_of_nodes() == n * n
      for node in g:
          assert g.degree(node) == 8
          assert len(node) == 2
          for i in node:
              assert int(i) == i
              assert 0 <= i < n
  
file_path: networkx/networkx/generators/tests/test_expanders.py
imports: import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_margulis_gabber_galil_graph_properties(n) without return types