code: def test_resample(self, input_param, input_data, expected_val):
      g = Resample(**input_param)
      result = g(**input_data)
      if "device" in input_data:
          self.assertEqual(result.device, input_data["device"])
      assert_allclose(
          result, expected_val, rtol=1e-4, atol=1e-4, type_test=False
      )
  
file_path: MONAI/tests/test_resampler.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.transforms import Resample
  from monai.transforms.utils import create_grid
  from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 1 for calling the TestResample obj's underlying member method code with example usage: obj.test_resample(input_param, input_data, expected_val) without return types