'Train a classifier on each specified time slice.
.. note::
This function sets the ``picks_``, ``ch_names``, ``cv_``,
``y_train``, ``train_times_`` and ``estimators_`` attributes.
Parameters
epochs : instance of Epochs
The epochs.
y : list or ndarray of int, shape (n_samples,) or None, optional
To-be-fitted model values. If None, y = epochs.events[:, 2].
Returns
self : TimeDecoding
Returns fitted TimeDecoding object.
Notes
If X and y are not C-ordered and contiguous arrays of np.float64 and
X is not a scipy.sparse.csr_matrix, X and/or y may be copied.
If X is a dense array, then the other methods will not support sparse
matrices as input.'

def fit(self, epochs, y=None):

    self._prep_times()
    super(TimeDecoding, self).fit(epochs, y=y)
    self._clean_times()
    return self
