class_docstr: Sequence Top-K accuracy. Assumes integer labels, with
  each item to be classified having a single correct class.
docstr: # Returns
  
  The accumulated accuracy.
docstr_tok: ["#","Returns","The","accumulated","accuracy","."]
code: def get_metric(self, reset: bool = False):
      """
      # Returns
  
      The accumulated accuracy.
      """
      if self.total_count > 0:
          accuracy = self.correct_count / self.total_count
      else:
          accuracy = 0
      if reset:
          self.reset()
      return {"accuracy": accuracy}
  
file_path: allennlp/allennlp/training/metrics/sequence_accuracy.py
imports: from typing import Optional
  import torch
  from allennlp.common.checks import ConfigurationError
  from allennlp.training.metrics.metric import Metric
  from allennlp.nn.util import dist_reduce_sum
label_desc: Use image node_id 3 for calling the SequenceAccuracy obj's underlying member method code with example usage: obj.get_metric(reset) and returns: dict