code: def accuracy(reference, test):
      """
      Given a list of reference values and a corresponding list of test
      values, return the fraction of corresponding values that are
      equal.  In particular, return the fraction of indices
      ``0<i<=len(test)`` such that ``test[i] == reference[i]``.
  
      :type reference: list
      :param reference: An ordered list of reference values.
      :type test: list
      :param test: A list of values to compare against the corresponding
          reference values.
      :raise ValueError: If ``reference`` and ``length`` do not have the
          same length.
      """
      if len(reference) != len(test):
          raise ValueError("Lists must have the same length.")
      return sum(x == y for x, y in zip(reference, test)) / len(test)
  
file_path: nltk/nltk/metrics/scores.py
imports: import operator
  from functools import reduce
  from math import fabs
  from random import shuffle
  from nltk.util import LazyConcatenation, LazyMap
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy(reference, test) and returns: unknown