code: def test_different_affines():
      # Mask and EIP files with different affines
      mask_img = Nifti1Image(
          np.ones((2, 2, 2), dtype=np.int8),
          affine=np.diag((4, 4, 4, 1)),
      )
      epi_img1 = Nifti1Image(
          np.ones((4, 4, 4, 3)), affine=np.diag((2, 2, 2, 1))
      )
      epi_img2 = Nifti1Image(
          np.ones((3, 3, 3, 3)), affine=np.diag((3, 3, 3, 1))
      )
      masker = MultiNiftiMasker(mask_img=mask_img)
      epis = masker.fit_transform([epi_img1, epi_img2])
      for this_epi in epis:
          masker.inverse_transform(this_epi)
  
imports: import shutil
  from tempfile import mkdtemp
  import numpy
  import pytest
  from joblib import Memory
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_equal
  from nilearn._utils.exceptions import DimensionError
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _rng
  from nilearn.image import get_data
  from nilearn.maskers import MultiNiftiMasker
label_desc: Use image node_id 3 for calling a global function with example usage: test_different_affines() without return types