code: def mppca(
      arr,
      mask=None,
      patch_radius=2,
      pca_method="eig",
      return_sigma=False,
      out_dtype=None,
      suppress_warning=False,
  ):
      r"""Performs PCA-based denoising using the Marcenko-Pastur
      distribution [1]_.
  
      Parameters
      ----------
      arr : 4D array
          Array of data to be denoised. The dimensions are (X, Y, Z, N), where N
          are the diffusion gradient directions.
      mask : 3D boolean array (optional)
          A mask with voxels that are true inside the brain and false outside of
          it. The function denoises within the true part and returns zeros
          outside of those voxels.
      patch_radius : int or 1D array (optional)
          The radius of the local patch to be taken around each voxel (in
          voxels). E.g. patch_radius=2 gives 5x5x5 patches.
      pca_method : 'eig' or 'svd' (optional)
          Use either eigenvalue decomposition (eig) or singular value
          decomposition (svd) for principal component analysis. The default
          method is 'eig' which is faster. However, occasionally 'svd' might be
          more accurate.
      return_sigma : bool (optional)
          If true, a noise standard deviation estimate based on the
          Marcenko-Pastur distribution is returned [2]_.
      out_dtype : str or dtype (optional)
          The dtype for the output array. Default: output has the same dtype as
          the input.
      suppress_warning : bool (optional)
          If true, suppress warning caused by patch_size < arr.shape[-1].
  
      Returns
      -------
      denoised_arr : 4D array
          This is the denoised array of the same size as that of the input data,
          clipped to non-negative values
      sigma : 3D array (when return_sigma=True)
          Estimate of the spatial varying standard deviation of the noise
  
      References
      ----------
      .. [1] Veraart J, Novikov DS, Christiaens D, Ades-aron B, Sijbers,
             Fieremans E, 2016. Denoising of Diffusion MRI using random matrix
             theory. Neuroimage 142:394-406.
             doi: 10.1016/j.neuroimage.2016.08.016
      .. [2] Veraart J, Fieremans E, Novikov DS. 2016. Diffusion MRI noise
             mapping using random matrix theory. Magnetic Resonance in Medicine.
             doi: 10.1002/mrm.26059.
      """
      return genpca(
          arr,
          sigma=None,
          mask=mask,
          patch_radius=patch_radius,
          pca_method=pca_method,
          tau_factor=None,
          return_sigma=return_sigma,
          out_dtype=out_dtype,
          suppress_warning=suppress_warning,
      )
  
file_path: dipy/dipy/denoise/localpca.py
imports: import copy
  from packaging.version import Version
  from warnings import warn
  import numpy
  import scipy
  from scipy.linalg import eigh
  from dipy.denoise.pca_noise_estimate import pca_noise_estimate
label_desc: Use image node_id 9 for calling a global function with example usage: mppca(arr, mask, patch_radius, pca_method, return_sigma, out_dtype, suppress_warning) and returns: genpca