code: def test_standardization(rng):
      data_shape = (9, 9, 5)
      n_samples = 500
  
      signals = rng.standard_normal(
          size=(2, np.prod(data_shape), n_samples)
      )
      means = (
          rng.standard_normal(size=(2, np.prod(data_shape), 1)) * 50
          + 1000
      )
      signals += means
  
      img1 = Nifti1Image(
          signals[0].reshape(data_shape + (n_samples,)), np.eye(4)
      )
      img2 = Nifti1Image(
          signals[1].reshape(data_shape + (n_samples,)), np.eye(4)
      )
  
      mask = Nifti1Image(np.ones(data_shape), np.eye(4))
  
      # z-score
      masker = MultiNiftiMasker(mask, standardize="zscore_sample")
      trans_signals = masker.fit_transform([img1, img2])
  
      for ts in trans_signals:
          np.testing.assert_almost_equal(ts.mean(0), 0)
          np.testing.assert_almost_equal(ts.std(0), 1, decimal=3)
  
      # psc
      masker = MultiNiftiMasker(mask, standardize="psc")
      trans_signals = masker.fit_transform([img1, img2])
  
      for ts, s in zip(trans_signals, signals):
          np.testing.assert_almost_equal(ts.mean(0), 0)
          np.testing.assert_almost_equal(
              ts, (s / s.mean(1)[:, np.newaxis] * 100 - 100).T
          )
  
imports: import shutil
  from tempfile import mkdtemp
  import numpy
  import pytest
  from joblib import Memory
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_equal
  from nilearn._utils.exceptions import DimensionError
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _rng
  from nilearn.image import get_data
  from nilearn.maskers import MultiNiftiMasker
label_desc: Use image node_id 11 for calling a global function with example usage: test_standardization(rng) without return types