code: def get_extract_metrics_f1(golds_outtext: List, preds_outtext: List):
      relation_metric = Metric()
  
      for gold_outtext, pred_outtext in zip(
          golds_outtext, preds_outtext
      ):
          gold_kg = rte_post_process(gold_outtext)
          pred_kg = rte_post_process(pred_outtext)
          relation_metric.count_instance_f1(gold_kg, pred_kg)
  
      f1 = relation_metric.compute_f1()
      result = {"overall-score": f1}
      return result
  
file_path: DeepKE/example/triple/mt5/utils.py
imports: from datasets import Features, Value, Sequence
  import re
  from typing import List
  from copy import deepcopy
label_desc: Use image node_id 2 for calling a global function with example usage: get_extract_metrics_f1(golds_outtext, preds_outtext) and returns: result