code: def test_with_globbing_patterns_on_one_or_several_images(
      imgs, tmp_path
  ):
      multi_pca = _MultiPCA(n_components=3)
  
      filenames = write_imgs_to_path(
          *imgs,
          file_path=tmp_path,
          create_files=True,
          use_wildcards=True,
      )
  
      multi_pca.fit(filenames)
  
      components_img = multi_pca.components_img_
      assert isinstance(components_img, Nifti1Image)
  
      # n_components = 3
      check_shape = img_4D().shape[:3] + (3,)
      assert components_img.shape == check_shape
      assert len(components_img.shape) == 4
  
imports: import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_almost_equal
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _affine_eye, _rng
  from nilearn.decomposition._multi_pca import _MultiPCA
  from nilearn.maskers import MultiNiftiMasker, NiftiMasker
label_desc: Use image node_id 17 for calling a global function with example usage: test_with_globbing_patterns_on_one_or_several_images(imgs, tmp_path) without return types