code: def test_multi_pca_componenent_errors(mask_img):
      """Test that a ValueError is raised \
      if the number of components is too low."""
      multi_pca = _MultiPCA(mask=mask_img)
      with pytest.raises(
          ValueError, match="Object has no components_ attribute."
      ):
          multi_pca._check_components_()
  
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 8 for calling a global function with example usage: test_multi_pca_componenent_errors(mask_img) without return types