code: def test_iter_check_niimgs_error():
      no_file_matching = "No files matching path: %s"
  
      for empty in ((), [], (i for i in ()), [i for i in ()]):
          with pytest.raises(
              ValueError, match="Input niimgs list is empty."
          ):
              list(iter_check_niimg(empty))
  
      nofile_path = "/tmp/nofile"
      with pytest.raises(
          ValueError, match=no_file_matching % nofile_path
      ):
          list(iter_check_niimg(nofile_path))
  
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 11 for calling a global function with example usage: test_iter_check_niimgs_error() without return types