code: def compute_f1(predicted, gold, matched):
      precision = safe_div(matched, predicted)
      recall = safe_div(matched, gold)
      f1 = safe_div(2 * precision * recall, precision + recall)
      return precision, recall, f1
  
file_path: DeepKE/src/deepke/event_extraction/standard/degree/utils.py
imports: from tensorboardX import SummaryWriter
label_desc: Use image node_id 3 for calling a global function with example usage: compute_f1(predicted, gold, matched) and returns: precision,  recall,  f1