'Score Epochs.
Estimate scores across trials by comparing the prediction estimated for
each trial to its true value.
Calls ``predict()`` if it has not been already.
.. note::
The function updates the ``scorer_``, ``scores_``, and
``y_true_`` attributes.
.. note::
If ``predict_mode`` is \'mean-prediction\', ``score_mode`` is
automatically set to \'mean-sample-wise\'.
Parameters
epochs : instance of Epochs | None, optional
The epochs. Can be similar to fitted epochs or not.
If None, it needs to rely on the predictions ``y_pred_``
generated with ``predict()``.
y : list | ndarray, shape (n_epochs,) | None, optional
True values to be compared with the predictions ``y_pred_``
generated with ``predict()`` via ``scorer_``.
If None and ``predict_mode``==\'cross-validation\' y = ``y_train_``.
Returns
scores : list of float, shape (n_times,)
The scores estimated by ``scorer_`` at each time sample (e.g. mean
accuracy of ``predict(X)``).'

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

    if (epochs is not None):
        self.predict(epochs)
    elif (not hasattr(self, 'y_pred_')):
        raise RuntimeError('Please    predict()    epochs    first    or    pass    epochs    to    score()')
    self._prep_times()
    super(TimeDecoding, self).score(epochs=None, y=y)
    self._clean_times()
    return self.scores_
