code: def test_components_img(multi_pca_data, mask_img):
      n_components = 3
  
      multi_pca = _MultiPCA(
          mask=mask_img, n_components=n_components, random_state=0
      )
      multi_pca.fit(multi_pca_data)
      components_img = multi_pca.components_img_
  
      assert isinstance(components_img, Nifti1Image)
  
      check_shape = multi_pca_data[0].shape[:3] + (n_components,)
  
      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 16 for calling a global function with example usage: test_components_img(multi_pca_data, mask_img) without return types