code: def test_check_same_fov(affine_eye):
      affine_b = affine_eye * 2
  
      shape_a = (2, 2, 2)
      shape_b = (3, 3, 3)
  
      shape_a_affine_a = Nifti1Image(np.empty(shape_a), affine_eye)
      shape_a_affine_a_2 = Nifti1Image(np.empty(shape_a), affine_eye)
      shape_a_affine_b = Nifti1Image(np.empty(shape_a), affine_b)
      shape_b_affine_a = Nifti1Image(np.empty(shape_b), affine_eye)
      shape_b_affine_b = Nifti1Image(np.empty(shape_b), affine_b)
  
      niimg_conversions.check_same_fov(
          a=shape_a_affine_a, b=shape_a_affine_a_2, raise_error=True
      )
  
      with pytest.raises(
          ValueError, match="[ac] and [ac] do not have the same affine"
      ):
          niimg_conversions.check_same_fov(
              a=shape_a_affine_a,
              b=shape_a_affine_a_2,
              c=shape_a_affine_b,
              raise_error=True,
          )
      with pytest.raises(
          ValueError, match="[ab] and [ab] do not have the same shape"
      ):
          niimg_conversions.check_same_fov(
              a=shape_a_affine_a, b=shape_b_affine_a, raise_error=True
          )
      with pytest.raises(
          ValueError, match="[ab] and [ab] do not have the same affine"
      ):
          niimg_conversions.check_same_fov(
              a=shape_b_affine_b, b=shape_a_affine_a, raise_error=True
          )
  
      with pytest.raises(
          ValueError, match="[ab] and [ab] do not have the same shape"
      ):
          niimg_conversions.check_same_fov(
              a=shape_b_affine_b, b=shape_a_affine_a, raise_error=True
          )
  
imports: import os
  import re
  import tempfile
  from pathlib import Path
  import nibabel
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_equal
  import nilearn
  from nilearn import _utils
  from nilearn._utils import niimg_conversions, testing
  from nilearn._utils.exceptions import DimensionError
  from nilearn._utils.niimg_conversions import iter_check_niimg
  from nilearn._utils.testing import assert_memory_less_than, with_memory_profiler
  from nilearn.image import get_data
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_same_fov(affine_eye) without return types