code: def mergesetfeat(in_feats, in_labels, in_tracks):
      trackset = list(set(list(in_tracks)))
      out_feats = []
      out_labels = []
      for track in trackset:
          feat = np.mean(in_feats[in_tracks == track], axis=0)
          feat = feat / np.linalg.norm(feat, ord=2)
          label = in_labels[in_tracks == track][0]
          out_feats.append(feat)
          out_labels.append(label)
      out_feats = np.vstack(out_feats)
      out_labels = np.vstack(out_labels)
      return out_feats, out_labels
  
imports: import os
  import re
  import cv2
  import gc
  import numpy
  import pandas
  from tqdm import tqdm
  import warnings
label_desc: Use image node_id 8 for calling a global function with example usage: mergesetfeat(in_feats, in_labels, in_tracks) and returns: out_feats,  out_labels