code: def load_gt_from_file(metric_file):
      if not os.path.exists(metric_file):
          raise ValueError(
              "The log file {} does not exists!".format(metric_file)
          )
      with open(metric_file, "r") as f:
          data = f.readlines()
          f.close()
      parser_gt = {}
      for line in data:
          metric, result = line.strip("\n").split(":")
          if "Class" in metric:
              parser_gt[metric] = result
          else:
              parser_gt[metric] = float(result)
      return parser_gt
  
file_path: PaddleSeg/test_tipc/compare_results.py
imports: import numpy
  import os
  import subprocess
  import json
  import argparse
  import glob
  from val import evaluate
label_desc: Use image node_id 4 for calling a global function with example usage: load_gt_from_file(metric_file) and returns: parser_gt