'Aux method.'

def _apply_epochs(self, epochs, include, exclude, event_id, picks):

    if (not epochs.preload):
        raise ValueError('Epochs    must    be    preloaded    to    apply    Xdawn')
    epochs_dict = dict()
    data = np.hstack(epochs.get_data()[:, picks])
    for eid in event_id:
        data_r = self._pick_sources(data, include, exclude, eid)
        data_r = np.array(np.split(data_r, len(epochs.events), 1))
        info_r = cp.deepcopy(epochs.info)
        epochs_r = EpochsArray(data=data_r, info=info_r, events=epochs.events, tmin=epochs.tmin, event_id=epochs.event_id, verbose=False)
        epochs_r.preload = True
        epochs_dict[eid] = epochs_r
    return epochs_dict
