code: def test_smoketest(self):
      x = np.array(
          [(0, 0), (0, 2), (1, 0), (1, 2), (0.25, 0.75), (0.6, 0.8)],
          dtype=float,
      )
      tri = qhull.Delaunay(x)
  
      # Should be exact for linear functions, independent of triangulation
  
      funcs = [
          (lambda x, y: 0 * x + 1, (0, 0)),
          (lambda x, y: 0 + x, (1, 0)),
          (lambda x, y: -2 + y, (0, 1)),
          (lambda x, y: 3 + 3 * x + 14.15 * y, (3, 14.15)),
      ]
  
      for j, (func, grad) in enumerate(funcs):
          z = func(x[:, 0], x[:, 1])
          dz = interpnd.estimate_gradients_2d_global(tri, z, tol=1e-6)
  
          assert_equal(dz.shape, (6, 2))
          assert_allclose(
              dz,
              np.array(grad)[None, :] + 0 * dz,
              rtol=1e-5,
              atol=1e-5,
              err_msg="item %d" % j,
          )
  
imports: import os
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_almost_equal, suppress_warnings
  from pytest import raises
  import pytest
  import scipy.interpolate.interpnd
  import scipy.spatial.qhull
  import pickle
label_desc: Use image node_id 1 for calling the TestEstimateGradients2DGlobal obj's underlying member method code with example usage: obj.test_smoketest() without return types