code: def get_labels_with_camera(
      cid_tid_dict,
      cid_tids,
      use_ff=True,
      use_rerank=True,
      use_st_filter=False,
  ):
      # 1st cluster
      sub_cid_tids = subcam_list(cid_tid_dict, cid_tids)
      sub_labels = dict()
      dis_thrs = [0.7, 0.5, 0.5, 0.5, 0.5, 0.7, 0.5, 0.5, 0.5, 0.5]
  
      for i, sub_c_to_c in enumerate(sub_cid_tids):
          sim_matrix = get_sim_matrix(
              cid_tid_dict,
              sub_cid_tids[sub_c_to_c],
              use_ff=use_ff,
              use_rerank=use_rerank,
              use_st_filter=use_st_filter,
          )
          cluster_labels = AgglomerativeClustering(
              n_clusters=None,
              distance_threshold=1 - dis_thrs[i],
              affinity="precomputed",
              linkage="complete",
          ).fit_predict(1 - sim_matrix)
          labels = get_match(cluster_labels)
          cluster_cid_tids = get_cid_tid(
              labels, sub_cid_tids[sub_c_to_c]
          )
          sub_labels[sub_c_to_c] = cluster_cid_tids
      labels, sub_cluster = combin_cluster(sub_labels, cid_tids)
  
      # 2nd cluster
      cid_tid_dict_new = combin_feature(cid_tid_dict, sub_cluster)
      sub_cid_tids = subcam_list2(cid_tid_dict_new, cid_tids)
      sub_labels = dict()
      for i, sub_c_to_c in enumerate(sub_cid_tids):
          sim_matrix = get_sim_matrix(
              cid_tid_dict_new,
              sub_cid_tids[sub_c_to_c],
              use_ff=use_ff,
              use_rerank=use_rerank,
              use_st_filter=use_st_filter,
          )
          cluster_labels = AgglomerativeClustering(
              n_clusters=None,
              distance_threshold=1 - 0.1,
              affinity="precomputed",
              linkage="complete",
          ).fit_predict(1 - sim_matrix)
          labels = get_match(cluster_labels)
          cluster_cid_tids = get_cid_tid(
              labels, sub_cid_tids[sub_c_to_c]
          )
          sub_labels[sub_c_to_c] = cluster_cid_tids
      labels, sub_cluster = combin_cluster(sub_labels, cid_tids)
  
      return labels
  
file_path: PaddleDetection/deploy/pptracking/python/mot/mtmct/camera_utils.py
imports: import numpy
  from .utils import get_dire, get_match, get_cid_tid, combin_feature, combin_cluster
  from .utils import normalize, intracam_ignore, visual_rerank
label_desc: Use image node_id 5 for calling a global function with example usage: get_labels_with_camera(cid_tid_dict, cid_tids, use_ff, use_rerank, use_st_filter) and returns: labels