code: def mtmct_process(
      multi_res, captures, mtmct_vis=True, output_dir="output"
  ):
      cid_tid_dict = res2dict(multi_res)
      if len(cid_tid_dict) == 0:
          print("no tracking result found, mtmct will be skiped.")
          return
      map_tid = sub_cluster(cid_tid_dict)
  
      if not os.path.exists(output_dir):
          os.mkdir(output_dir)
      pred_mtmct_file = os.path.join(output_dir, "mtmct_result.txt")
      gen_restxt(pred_mtmct_file, map_tid, cid_tid_dict)
  
      if mtmct_vis:
          camera_results, cid_tid_fid_res = get_mtmct_matching_results(
              pred_mtmct_file
          )
  
          save_mtmct_vis_results(
              camera_results,
              captures,
              output_dir=output_dir,
              multi_res=cid_tid_dict,
          )
  
imports: from pptracking.python.mot.visualize import plot_tracking
  from python.visualize import visualize_attr
  import os
  import re
  import cv2
  import gc
  import numpy
  import pandas
  from tqdm import tqdm
  from functools import reduce
  import warnings
label_desc: Use image node_id 16 for calling a global function with example usage: mtmct_process(multi_res, captures, mtmct_vis, output_dir) without return types