code: def test_check_niimg_wildcards(
      affine_eye, shape, wildcards, tmp_path
  ):
      # First create some testing data
      img = Nifti1Image(np.zeros(shape), affine_eye)
  
      filename = testing.write_imgs_to_path(
          img, file_path=tmp_path, create_files=True
      )
      assert_array_equal(
          get_data(_utils.check_niimg(filename, wildcards=wildcards)),
          get_data(img),
      )
  
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 8 for calling a global function with example usage: test_check_niimg_wildcards(affine_eye, shape, wildcards, tmp_path) without return types