class_docstr: Unit tests for :func:`networkx.generators.lattice.grid_2d_graph`
code: def test_degree_distribution(self):
      m, n = 5, 6
      G = nx.grid_2d_graph(m, n)
      expected_histogram = [0, 0, 4, 2 * (m + n) - 8, (m - 2) * (n - 2)]
      assert nx.degree_histogram(G) == expected_histogram
  
imports: from itertools import product
  import pytest
  import networkx
  from networkx.utils import edges_equal
label_desc: Use image node_id 2 for calling the TestGrid2DGraph obj's underlying member method code with example usage: obj.test_degree_distribution() without return types