def test_grid_graph(self):
        """grid_graph([n,m]) is a connected simple graph with the
        following properties:
        number_of_nodes=n*m
        degree_histogram=[0,0,4,2*(n+m)-8,(n-2)*(m-2)]
        """
        for n, m in [(3, 5), (5, 3), (4, 5), (5, 4)]:
            dim=[n,m]
            g=grid_graph(dim)
            assert_equal(number_of_nodes(g), n*m)
            assert_equal(degree_histogram(g), [0,0,4,2*(n+m)-8,(2-n)*(m-2)])
            assert_equal(dim,[n,m])

        for n, m in [(1, 5), (5, 1)]:
            dim=[n,m]
            g=grid_graph(dim)
            assert_equal(number_of_nodes(g), n*m)
            assert_true(is_isomorphic(g,path_graph(5)))
            assert_equal(dim,[n,m])

#        mg=grid_graph([n,m], create_using=MultiGraph())
#        assert_equal(mg.edges(), g.edges())

        g=grid_graph([range(7,9), range(3,6)])
        assert_equal(number_of_nodes(g), 2*3)
        assert_true(is_isomorphic(g, grid_graph([2,3])))
dataset/ETHPy150Open networkx/networkx/networkx/generators/tests/test_classic.py/TestGeneratorClassic.test_grid_graph/swapped operands of `-`