class_docstr: Tuple Metric 
code: def compute_f1(self, prefix=""):
      tp = self.tp
      pred_num = self.pred_num
      gold_num = self.gold_num
      p, r = self.safe_div(tp, pred_num), self.safe_div(tp, gold_num)
      return {
          prefix + "tp": tp,
          prefix + "gold": gold_num,
          prefix + "pred": pred_num,
          prefix + "P": p * 100,
          prefix + "R": r * 100,
          prefix + "F1": self.safe_div(2 * p * r, p + r) * 100,
      }
  
imports: from collections import defaultdict
  from copy import deepcopy
  from typing import Dict, List
  import sys
label_desc: Use image node_id 4 for calling the Metric obj's underlying member method code with example usage: obj.compute_f1(prefix) and returns: dict