code: def test_resampling_continuous_with_affine(
      affine_eye, shape, angle, rng
  ):
      data = rng.integers(1, 4, size=shape, dtype="int32")
      rot = rotation(0, angle)
      img = Nifti1Image(data, affine_eye)
  
      rot_img = resample_img(
          img, target_affine=rot, interpolation="continuous"
      )
      rot_img_back = resample_img(
          rot_img, target_affine=affine_eye, interpolation="continuous"
      )
  
      center = slice(1, 9)
      # values on the edges are wrong for some reason
      mask = (0, center, center)
      assert_allclose(get_data(img)[mask], get_data(rot_img_back)[mask])
  
      assert get_data(rot_img).dtype == np.dtype(
          data.dtype.name.replace("int", "float")
      )
  
imports: import copy
  import math
  import os
  from pathlib import Path
  import numpy
  import pytest
  from nibabel import Nifti1Header, Nifti1Image
  from nibabel.freesurfer import MGHImage
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal, assert_equal
  from nilearn import _utils
  from nilearn._utils import testing
  from nilearn.conftest import _affine_eye, _rng
  from nilearn.image import get_data
  from nilearn.image.image import _pad_array, crop_img
  from nilearn.image.resampling import BoundingBoxError, coord_transform, from_matrix_vector, get_bounds, reorder_img, resample_img, resample_to_img
label_desc: Use image node_id 10 for calling a global function with example usage: test_resampling_continuous_with_affine(affine_eye, shape, angle, rng) without return types