code: def test_xi_nd(self):
      # verify that higher-d xi works as expected
      points, values = self._sample_4d_data()
  
      cp.random.seed(1234)
      sample = cp.random.rand(2, 3, 4)
  
      v1 = interpn(
          points, values, sample, method="nearest", bounds_error=False
      )
      assert_array_equal(v1.shape, (2, 3))
  
      v2 = interpn(
          points,
          values,
          sample.reshape(-1, 4),
          method="nearest",
          bounds_error=False,
      )
      assert_allclose(v1, v2.reshape(v1.shape))
  
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 8 for calling the TestInterpN obj's underlying member method code with example usage: obj.test_xi_nd() without return types