code: def score(self, X, y, lengths=None):
          
          return accuracy_score(y, self.predict(X, lengths))
docs: Returns the mean accuracy on the given test data and labels.
  
          Parameters
          ----------
          X : array-like, shape = (n_samples, n_features)
              Test samples.
  
          y : array-like, shape = (n_samples,)
              True labels for X.
  
          lengths : array-like of integer, shape (n_sequences,), optional
              Lengths of sequences in X. If not given, X is assumed to be a
              single sequence of length n_samples.
  
          Returns
          -------
          score : float
              Mean accuracy of self.predict(X, lengths) wrt. y.