'Aux method.'

def _apply_epochs(self, epochs, include, exclude, n_pca_components):

    if (not epochs.preload):
        raise ValueError('Epochs    must    be    preloaded    to    apply    ICA')
    picks = pick_types(epochs.info, meg=False, ref_meg=False, include=self.ch_names, exclude='bads')
    if (len(picks) != len(self.ch_names)):
        raise RuntimeError(("Epochs    don't    match    fitted    data:    %i    channels    fitted    but    %i    channels    supplied.    \nPlease    provide    Epochs    compatible    with    ica.ch_names" % (len(self.ch_names), len(picks))))
    if (n_pca_components is not None):
        self.n_pca_components = n_pca_components
    data = np.hstack(epochs.get_data()[:, picks])
    (data, _) = self._pre_whiten(data, epochs.info, picks)
    data = self._pick_sources(data, include=include, exclude=exclude)
    epochs._data[:, picks] = np.array(np.split(data, len(epochs.events), 1))
    epochs.preload = True
    return epochs
