code: def test_resample_uint_data():
      arr = np.random.randint(100, size=(10, 11, 12)).astype("uint8")
      img = Image(arr, vox2mni(np.eye(4)))
      aff_obj = Affine((0.5, 0.5, 0.5, 0.1, 0.1, 0.1, 0, 0, 0, 0, 0, 0))
      for transform in aff_obj, ApplyAffine(aff_obj.as_affine()):
          img2 = resample(img, transform)
          assert np.min(img2.get_fdata()) >= 0
          assert np.max(img2.get_fdata()) < 255
  
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 10 for calling a global function with example usage: test_resample_uint_data() without return types