code: def test_PCANoMask(data):
      ntotal = data["nimages"] - 1
      ncomp = 5
      p = pca(data["fmridata"], -1, ncomp=ncomp)
      assert p["basis_vectors"].shape == (data["nimages"], ntotal)
      assert p["basis_projections"].shape == data["mask"].shape + (
          ncomp,
      )
      assert p["pcnt_var"].shape == (ntotal,)
      assert_almost_equal(p["pcnt_var"].sum(), 100.0)
  
imports: import numpy
  import pytest
  from nipy.io.api import load_image
  from nipy.testing import assert_almost_equal, assert_array_almost_equal, funcfile
  from ..pca import pca
label_desc: Use image node_id 14 for calling a global function with example usage: test_PCANoMask(data) without return types