code: def exact_match(items):
      """
      Counts a question as correct if the model accurately classifies the plausibility
      of an answer for all candidate answers. See section 4 "Evaluation Metrics" in the paper.
      """
      results = list(zip(*items))
      accuracies = defaultdict(list)
      for gold, pred, question in zip(
          results[0], results[1], results[2]
      ):
          accuracies[question].append(pred == gold)
      return np.mean([int(all(accs)) for accs in accuracies.values()])
  
imports: import numpy
  from collections import defaultdict
  from lm_eval.base import rf, Task
label_desc: Use image node_id 1 for calling a global function with example usage: exact_match(items) and returns: np