code: def test_flips(self, img, device, data_param, expected_output):
      for p in TEST_NDARRAYS_ALL:
          img = p(img)
          if isinstance(img, MetaTensor):
              img.affine = torch.eye(4)
          if hasattr(img, "to"):
              img = img.to(device)
          resampler = SpatialResample()
          call_param = data_param.copy()
          call_param["img"] = img
          out = resampler(**call_param)
          assert_allclose(out, expected_output, rtol=1e-2, atol=1e-2)
          assert_allclose(
              to_affine_nd(len(out.shape) - 1, out.affine),
              call_param["dst_affine"],
          )
  
          test_resampler_lazy(
              resampler, out, init_param=None, call_param=call_param
          )
  
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 1 for calling the TestSpatialResample obj's underlying member method code with example usage: obj.test_flips(img, device, data_param, expected_output) without return types