def METHOD_NAME(self, imgs, confounds=None, sample_mask=None):
    """Apply mask, spatial and temporal preprocessing.
    Parameters
    ----------
    %(imgs)s
        Images to process. Each element of the list is a 4D image.
    %(confounds)s
    %(sample_mask)s
    Returns
    -------
    region_signals : list of 2D :obj:`numpy.ndarray`
        List of signals for each label per subject.
        shape: list of (number of scans, number of labels)
    """
    self._check_fitted()
    if not hasattr(imgs, "__iter__") or isinstance(imgs, str):
        return self.transform_single_imgs(imgs)
    return self.transform_imgs(
        imgs, confounds, n_jobs=self.n_jobs, sample_mask=sample_mask
    )