code: def test_maybe_regular_expander(d, n):
      pytest.importorskip("numpy")
      G = nx.maybe_regular_expander(n, d)
  
      assert len(G) == n, "Should have n nodes"
      assert len(G.edges) == n * d / 2, "Should have n*d/2 edges"
      assert nx.is_k_regular(G, d), "Should be d-regular"
  
file_path: networkx/networkx/generators/tests/test_expanders.py
imports: import pytest
  import networkx
label_desc: Use image node_id 5 for calling a global function with example usage: test_maybe_regular_expander(d, n) without return types