code: def test_input_torch(
      self, new_shape, tile, device, dtype, expected_data, track_meta
  ):
      set_track_meta(track_meta)
      img = np.arange(12).reshape(new_shape)
      img = torch.as_tensor(np.tile(img, tile)).to(device)
      dst = torch.tensor(
          [
              [1.0, 0.0, 0.0, 0.0],
              [0.0, 1.0, 0.0, 0.0],
              [0.0, 0.0, -1.0, 1.5],
              [0.0, 0.0, 0.0, 1.0],
          ]
      )
      dst = dst.to(dtype).to(device)
      init_param = {"dtype": dtype}
      call_param = {"img": img, "dst_affine": dst}
      resampler = SpatialResample(**init_param)
      out = resampler(**call_param)
      assert_allclose(out, expected_data[None], rtol=1e-2, atol=1e-2)
  
      test_resampler_lazy(resampler, out, init_param, call_param)
  
      if track_meta:
          self.assertIsInstance(out, MetaTensor)
          assert_allclose(
              out.affine, dst.to(torch.float32), rtol=1e-2, atol=1e-2
          )
      else:
          self.assertIsInstance(out, torch.Tensor)
          self.assertNotIsInstance(out, MetaTensor)
  
imports: from __future__ import annotations
  import unittest
  from copy import deepcopy
  import numpy
  import torch
  from parameterized import parameterized
  from monai.data.meta_obj import set_track_meta
  from monai.data.meta_tensor import MetaTensor
  from monai.data.utils import to_affine_nd
  from monai.transforms import SpatialResample
  from monai.utils import optional_import
  from tests.lazy_transforms_utils import test_resampler_lazy
  from tests.utils import TEST_DEVICES, TEST_NDARRAYS_ALL, assert_allclose
label_desc: Use image node_id 4 for calling the TestSpatialResample obj's underlying member method code with example usage: obj.test_input_torch(new_shape, tile, device, dtype, expected_data, track_meta) without return types