code: def test_leggrid2d(self):
      x1, x2, x3 = self.x
      y1, y2, y3 = self.y
  
      # test values
      tgt = np.einsum("i,j->ij", y1, y2)
      res = leg.leggrid2d(x1, x2, self.c2d)
      assert_almost_equal(res, tgt)
  
      # test shape
      z = np.ones((2, 3))
      res = leg.leggrid2d(z, z, self.c2d)
      assert_(res.shape == (2, 3) * 2)
  
imports: from functools import reduce
  import numpy
  import numpy.polynomial.legendre
  from numpy.polynomial.polynomial import polyval
  from numpy.testing import assert_almost_equal, assert_raises, assert_equal, assert_
label_desc: Use image node_id 4 for calling the TestEvaluation obj's underlying member method code with example usage: obj.test_leggrid2d() without return types