code: def test_inverse(self, img, device, data_param, expected_output):
      img = MetaTensor(img, affine=torch.eye(4)).to(device)
      tr = SpatialResample()
      out = tr(img=img, **data_param)
      assert_allclose(out, expected_output, rtol=1e-2, atol=1e-2)
      assert_allclose(
          to_affine_nd(len(out.shape) - 1, out.affine),
          data_param["dst_affine"],
      )
  
      # inverse
      out = tr.inverse(out)
      assert_allclose(img, out)
      expected_affine = to_affine_nd(len(out.affine) - 1, torch.eye(4))
      assert_allclose(out.affine, expected_affine)
  
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 5 for calling the TestSpatialResample obj's underlying member method code with example usage: obj.test_inverse(img, device, data_param, expected_output) without return types