code: def update(self, predicted, gold):
      predicted = (
          " ".join(predicted["coref"])
          if predicted["coref"]
          else "PRED_NONE"
      )
  
      gold_coref = (
          " ".join(gold["coref"]) if gold["coref"] else "GOLD_NONE"
      )
      gold_a, gold_b = " ".join(gold["A-coref"]), " ".join(
          gold["B-coref"]
      )
      try:
          if predicted in gold_coref or gold_coref in predicted:
              self.tp += 1
          elif (predicted in gold_a) or (gold_a in predicted):
              self.fp += 1
          elif (predicted in gold_b) or (gold_b in predicted):
              self.fp += 1
          elif gold_coref != "GOLD_NONE":
              self.fn += 1
      except:
          pass
      return
  
imports: import logging
  import numpy
  from collections import Counter, defaultdict
  from scipy.optimize import linear_sum_assignment
  from .blanc import blanc, tuple_to_metric
label_desc: Use image node_id 2 for calling the PRFEvaluator obj's underlying member method code with example usage: obj.update(predicted, gold) without return types