code: def test_nearest_4d(self):
      # create a 4-D grid of 3 points in each dimension
      points, values = self._sample_4d_data()
      interp_rg = RegularGridInterpolator(
          points, values, method="nearest"
      )
      sample = cp.asarray([[0.1, 0.1, 10.0, 9.0]])
      wanted = interpn(points, values, sample, method="nearest")
      assert_array_almost_equal(interp_rg(sample), wanted)
  
imports: import pytest
  import cupy
  from cupy.testing import assert_allclose, assert_array_equal, assert_array_almost_equal
  from cupy_backends.cuda.api import runtime
  from pytest import raises
  from cupyx.scipy.interpolate import RegularGridInterpolator, interpn
label_desc: Use image node_id 5 for calling the TestInterpN obj's underlying member method code with example usage: obj.test_nearest_4d() without return types