code: def _test_resample(arr, T, interp_orders):
      # Check basic cases of resampling
      img = Image(arr, vox2mni(np.eye(4)))
      for i in interp_orders:
          img2 = resample(img, T, interp_order=i)
          assert_array_almost_equal(img2.get_fdata(), img.get_fdata())
          img_aff = as_xyz_image(img)
          img2 = resample(
              img,
              T,
              reference=(img_aff.shape, xyz_affine(img_aff)),
              interp_order=i,
          )
          assert_array_almost_equal(img2.get_fdata(), img.get_fdata())
  
imports: import numpy
  from nibabel.affines import apply_affine
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ....core.api import Image, vox2mni
  from ....core.image.image_spaces import as_xyz_image, xyz_affine
  from ..affine import Affine
  from ..resample import cast_array, resample
  from ..transform import Transform
label_desc: Use image node_id 8 for calling a global function with example usage: _test_resample(arr, T, interp_orders) without return types