code: def test_check_niimg_wildcards_one_file_name(
      img_3d_zeros_eye, tmp_path
  ):
      file_not_found_msg = "File not found: '%s'"
  
      # Testing with a glob matching exactly one filename
      # Using a glob matching one file containing a 3d image returns a 4d image
      # with 1 as last dimension.
      globs = testing.write_imgs_to_path(
          img_3d_zeros_eye,
          file_path=tmp_path,
          create_files=True,
          use_wildcards=True,
      )
      assert_array_equal(
          get_data(_utils.check_niimg(globs))[..., 0],
          get_data(img_3d_zeros_eye),
      )
      # Disabled globbing behavior should raise an ValueError exception
      with pytest.raises(
          ValueError, match=file_not_found_msg % re.escape(globs)
      ):
          _utils.check_niimg(globs, wildcards=False)
  
      # Testing with a glob matching multiple filenames
      img_4d = _utils.check_niimg_4d(
          (img_3d_zeros_eye, img_3d_zeros_eye)
      )
      globs = testing.write_imgs_to_path(
          img_3d_zeros_eye,
          img_3d_zeros_eye,
          file_path=tmp_path,
          create_files=True,
          use_wildcards=True,
      )
      assert_array_equal(
          get_data(_utils.check_niimg(globs)), get_data(img_4d)
      )
  
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 9 for calling a global function with example usage: test_check_niimg_wildcards_one_file_name(img_3d_zeros_eye, tmp_path) without return types