code: def test_interp(self):
      tr = RandHistogramShift()
      for array_type in (torch.tensor, np.array):
          x = array_type([0.0, 4.0, 6.0, 10.0])
          y = array_type([1.0, -1.0, 3.0, 5.0])
  
          yi = tr.interp(array_type([0, 2, 4, 8, 10]), x, y)
          self.assertEqual(yi.shape, (5,))
          assert_allclose(yi, array_type([1.0, 0.0, -1.0, 4.0, 5.0]))
  
          yi = tr.interp(array_type([-1, 11, 10.001, -0.001]), x, y)
          self.assertEqual(yi.shape, (4,))
          assert_allclose(yi, array_type([1.0, 5.0, 5.0, 1.0]))
  
          yi = tr.interp(array_type([[-2, 11], [1, 3], [8, 10]]), x, y)
          self.assertEqual(yi.shape, (3, 2))
          assert_allclose(
              yi, array_type([[1.0, 5.0], [0.5, -0.5], [4.0, 5.0]])
          )
  
file_path: MONAI/tests/test_rand_histogram_shift.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.transforms import RandHistogramShift
  from tests.utils import TEST_NDARRAYS, assert_allclose
label_desc: Use image node_id 2 for calling the TestRandHistogramShift obj's underlying member method code with example usage: obj.test_interp() without return types