class_docstr: Class for masking of Niimg-like objects.
  
  MultiNiftiMasker is useful when dealing with image sets from multiple
  subjects. Use case: integrates well with decomposition by MultiPCA and
  CanICA (multi-subject models)
  
  Parameters
  ----------
  mask_img : Niimg-like object
      See :ref:`extracting_data`.
      Mask of the data. If not given, a mask is computed in the fit step.
      Optional parameters can be set using mask_args and mask_strategy to
      fine tune the mask extraction.
  %(smoothing_fwhm)s
  %(standardize_maskers)s
  %(standardize_confounds)s
  high_variance_confounds : :obj:`bool`, default=False
      If True, high variance confounds are computed on provided image with
      :func:`nilearn.image.high_variance_confounds` and default parameters
      and regressed out.
  %(detrend)s
  %(low_pass)s
  %(high_pass)s
  %(t_r)s
  target_affine : 3x3 or 4x4 :obj:`numpy.ndarray`, optional
      This parameter is passed to image.resample_img. Please see the
      related documentation for details.
  
  target_shape : 3-:obj:`tuple` of :obj:`int`, optional
      This parameter is passed to image.resample_img. Please see the
      related documentation for details.
  
  %(mask_strategy)s
  
      .. note::
          Depending on this value, the mask will be computed from
          :func:`nilearn.masking.compute_multi_background_mask`,
          :func:`nilearn.masking.compute_multi_epi_mask`, or
          :func:`nilearn.masking.compute_multi_brain_mask`.
  
      Default='background'.
  
  mask_args : :obj:`dict`, optional
      If mask is None, these are additional parameters passed to
      masking.compute_background_mask or masking.compute_epi_mask
      to fine-tune mask computation. Please see the related documentation
      for details.
  
  dtype : {dtype, "auto"}, optional
      Data type toward which the data should be converted. If "auto", the
      data will be converted to int32 if dtype is discrete and float32 if it
      is continuous.
  %(memory)s
  %(memory_level)s
  %(n_jobs)s
  %(verbose0)s
  %(masker_kwargs)s
  
  Attributes
  ----------
  mask_img_ : :obj:`nibabel.nifti1.Nifti1Image`
      The mask of the data.
  
  affine_ : 4x4 :obj:`numpy.ndarray`
      Affine of the transformed image.
  
  n_elements_ : :obj:`int`
      The number of voxels in the mask.
  
      .. versionadded:: 0.9.2
  
  See Also
  --------
  nilearn.image.resample_img: image resampling
  nilearn.masking.compute_epi_mask: mask computation
  nilearn.masking.apply_mask: mask application on image
  nilearn.signal.clean: confounds removal and general filtering of signals
docstr: Prepare multi subject data in parallel.
  
  Parameters
  ----------
  imgs_list : :obj:`list` of Niimg-like objects
      See :ref:`extracting_data`.
      List of imgs file to prepare. One item per subject.
  
  confounds : :obj:`list` of confounds, optional
      List of confounds (2D arrays or filenames pointing to CSV
      files or pandas DataFrames). Must be of same length than imgs_list.
  
  sample_mask : :obj:`list` of sample_mask, optional
      List of sample_mask (1D arrays) if scrubbing motion outliers.
      Must be of same length than imgs_list.
  
          .. versionadded:: 0.8.0
  
  copy : :obj:`bool`, default=True
      If True, guarantees that output array has no memory in common with
      input array.
  
  n_jobs : :obj:`int`, default=1
      The number of cpus to use to do the computation. -1 means
      'all cpus'.
  
  Returns
  -------
  region_signals : :obj:`list` of 2D :obj:`numpy.ndarray`
      List of signal for each element per subject.
      shape: list of (number of scans, number of elements)
  
  Warns
  -----
  DeprecationWarning
      If a 3D niimg input is provided, the current behavior
      (adding a singleton dimension to produce a 2D array) is deprecated.
      Starting in version 0.12, a 1D array will be returned for 3D
      inputs.
docstr_tok: ["Prepare","multi","subject","data","in","parallel",".","Parameters","--","--","--","--","--","imgs_list",":",":","obj",":","`","list","`","of","Niimg-like","objects","See",":","ref",":","`","extracting_data","`",".","List","of","imgs","file","to","prepare",".","One","item","per","subject",".","confounds",":",":","obj",":","`","list","`","of","confounds",",","optional","List","of","confounds","(","2D","arrays","or","filenames","pointing","to","CSV","files","or","pandas","DataFrames",")",".","Must","be","of","same","length","than","imgs_list",".","sample_mask",":",":","obj",":","`","list","`","of","sample_mask",",","optional","List","of","sample_mask","(","1D","arrays",")","if","scrubbing","motion","outliers",".","Must","be","of","same","length","than","imgs_list",".","..","versionadded",":",":","0.8.0","copy",":",":","obj",":","`","bool","`",",","default=True","If","True",",","guarantees","that","output","array","has","no","memory","in","common","with","input","array",".","n_jobs",":",":","obj",":","`","int","`",",","default=1","The","number","of","cpus","to","use","to","do","the","computation",".","-1","means","'all","cpus","'",".","Returns","--","--","--","-","region_signals",":",":","obj",":","`","list","`","of","2D",":","obj",":","`","numpy.ndarray","`","List","of","signal","for","each","element","per","subject",".","shape",":","list","of","(","number","of","scans",",","number","of","elements",")","Warns","--","--","-","DeprecationWarning","If","a","3D","niimg","input","is","provided",",","the","current","behavior","(","adding","a","singleton","dimension","to","produce","a","2D","array",")","is","deprecated",".","Starting","in","version","0.12",",","a","1D","array","will","be","returned","for","3D","inputs","."]
code: def transform_imgs(
      self,
      imgs_list,
      confounds=None,
      sample_mask=None,
      copy=True,
      n_jobs=1,
  ):
      """Prepare multi subject data in parallel.
  
      Parameters
      ----------
      imgs_list : :obj:`list` of Niimg-like objects
          See :ref:`extracting_data`.
          List of imgs file to prepare. One item per subject.
  
      confounds : :obj:`list` of confounds, optional
          List of confounds (2D arrays or filenames pointing to CSV
          files or pandas DataFrames). Must be of same length than imgs_list.
  
      sample_mask : :obj:`list` of sample_mask, optional
          List of sample_mask (1D arrays) if scrubbing motion outliers.
          Must be of same length than imgs_list.
  
              .. versionadded:: 0.8.0
  
      copy : :obj:`bool`, default=True
          If True, guarantees that output array has no memory in common with
          input array.
  
      n_jobs : :obj:`int`, default=1
          The number of cpus to use to do the computation. -1 means
          'all cpus'.
  
      Returns
      -------
      region_signals : :obj:`list` of 2D :obj:`numpy.ndarray`
          List of signal for each element per subject.
          shape: list of (number of scans, number of elements)
  
      Warns
      -----
      DeprecationWarning
          If a 3D niimg input is provided, the current behavior
          (adding a singleton dimension to produce a 2D array) is deprecated.
          Starting in version 0.12, a 1D array will be returned for 3D
          inputs.
  
      """
      if not hasattr(self, "mask_img_"):
          raise ValueError(
              f"It seems that {self.__class__.__name__} has not been "
              "fitted. "
              "You must call fit() before calling transform()."
          )
      target_fov = None
      if self.target_affine is None:
          # Force resampling on first image
          target_fov = "first"
  
      niimg_iter = _utils.niimg_conversions.iter_check_niimg(
          imgs_list,
          ensure_ndim=None,
          atleast_4d=False,
          target_fov=target_fov,
          memory=self.memory,
          memory_level=self.memory_level,
          verbose=self.verbose,
      )
  
      if confounds is None:
          confounds = itertools.repeat(None, len(imgs_list))
  
      # Ignore the mask-computing params: they are not useful and will
      # just invalidate the cache for no good reason
      # target_shape and target_affine are conveyed implicitly in mask_img
      params = _utils.class_inspect.get_params(
          self.__class__,
          self,
          ignore=[
              "mask_img",
              "mask_args",
              "mask_strategy",
              "copy",
          ],
      )
      params["clean_kwargs"] = self.clean_kwargs
  
      func = self._cache(
          _filter_and_mask,
          ignore=[
              "verbose",
              "memory",
              "memory_level",
              "copy",
          ],
          shelve=self._shelving,
      )
      data = Parallel(n_jobs=n_jobs)(
          delayed(func)(
              imgs,
              self.mask_img_,
              params,
              memory_level=self.memory_level,
              memory=self.memory,
              verbose=self.verbose,
              confounds=cfs,
              copy=copy,
              dtype=self.dtype,
          )
          for imgs, cfs in zip(niimg_iter, confounds)
      )
      return data
  
file_path: nilearn/nilearn/maskers/multi_nifti_masker.py
imports: import collections.abc
  import itertools
  import warnings
  from functools import partial
  from joblib import Memory, Parallel, delayed
  from nilearn import _utils, image, masking
  from nilearn.maskers._utils import compute_middle_image
  from nilearn.maskers.nifti_masker import NiftiMasker, _filter_and_mask
label_desc: Use image node_id 3 for calling the MultiNiftiMasker obj's underlying member method code with example usage: obj.transform_imgs(imgs_list, confounds, sample_mask, copy, n_jobs) and returns: data