code: def read_mcmot_results_union(filename, is_gt, is_ignore):
      results_dict = dict()
      if os.path.isfile(filename):
          all_result = np.loadtxt(filename, delimiter=",")
          if all_result.shape[0] == 0 or all_result.shape[1] < 7:
              return results_dict
          if is_ignore:
              return results_dict
          if is_gt:
              # only for test use
              all_result = all_result[all_result[:, 7] != 0]
              all_result[:, 7] = all_result[:, 7] - 1
  
          if all_result.shape[0] == 0:
              return results_dict
  
          class_unique = np.unique(all_result[:, 7])
  
          last_max_id = 0
          result_cls_list = []
          for cls in class_unique:
              result_cls_split = all_result[all_result[:, 7] == cls]
              result_cls_split[:, 1] = (
                  result_cls_split[:, 1] + last_max_id
              )
              # make sure track id different between every category
              last_max_id = max(np.unique(result_cls_split[:, 1])) + 1
              result_cls_list.append(result_cls_split)
  
          results_con = np.concatenate(result_cls_list)
  
          for line in range(len(results_con)):
              linelist = results_con[line]
              fid = int(linelist[0])
              if fid < 1:
                  continue
              results_dict.setdefault(fid, list())
  
              if is_gt:
                  score = 1
              else:
                  score = float(linelist[6])
  
              tlwh = tuple(map(float, linelist[2:6]))
              target_id = int(linelist[1])
              cls = int(linelist[7])
  
              results_dict[fid].append((tlwh, target_id, cls, score))
  
          return results_dict
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import copy
  import sys
  import math
  from collections import defaultdict
  import numpy
  import pandas
  from .metrics import Metric
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 3 for calling a global function with example usage: read_mcmot_results_union(filename, is_gt, is_ignore) and returns: results_dict, results_dict, results_dict, results_dict