code: def sequence_accuracy_score(y_true, y_pred):
      """
      Return sequence accuracy score. Match is counted only when two sequences
      are equal.
      """
      total = len(y_true)
      if not total:
          return 0
  
      matches = sum(
          1
          for yseq_true, yseq_pred in zip(y_true, y_pred)
          if yseq_true == yseq_pred
      )
  
      return matches / total
  
file_path: sklearn-crfsuite/sklearn_crfsuite/metrics.py
imports: from __future__ import absolute_import, division
  from functools import wraps
  from sklearn_crfsuite.utils import flatten
label_desc: Use image node_id 8 for calling a global function with example usage: sequence_accuracy_score(y_true, y_pred) and returns: unknown, int