code: def score(answer, gold):
      if len(gold) > 0:
          gold = set.union(*[simplify(g) for g in gold])
      answer = simplify(answer)
      tp, tn, sys_pos, real_pos = 0, 0, 0, 0
      if answer == gold:
          if not ("unanswerable" in gold and len(gold) == 1):
              tp += 1
          else:
              tn += 1
      if not ("unanswerable" in answer and len(answer) == 1):
          sys_pos += 1
      if not ("unanswerable" in gold and len(gold) == 1):
          real_pos += 1
      return np.array([tp, tn, sys_pos, real_pos])
  
imports: from subprocess import Popen, PIPE, CalledProcessError
  import json
  from text.torchtext.datasets.generic import Query
  import logging
  import os
  import re
  import string
  import numpy
  import collections
  from multiprocessing import Pool, cpu_count
  from contextlib import closing
  from pyrouge import Rouge155
  from sacrebleu import corpus_bleu
label_desc: Use image node_id 3 for calling a global function with example usage: score(answer, gold) and returns: np