code: def filter_bbox(self, mot_list, cid):
      new_mot_list = dict()
      yh = self.zones[cid].shape[0]
      for tracklet in mot_list:
          tracklet_dict = mot_list[tracklet]
          frame_list = list(tracklet_dict.keys())
          frame_list.sort()
          bbox_list = []
          for f in frame_list:
              bbox_list.append(tracklet_dict[f]["bbox"])
          bbox_x = [b[0] for b in bbox_list]
          bbox_y = [b[1] for b in bbox_list]
          bbox_w = [b[2] - b[0] for b in bbox_list]
          bbox_h = [b[3] - b[1] for b in bbox_list]
          new_frame_list = list()
          if 0 in bbox_x or 0 in bbox_y:
              b0 = [
                  i
                  for i, f in enumerate(frame_list)
                  if bbox_x[i] < 5 or bbox_y[i] + bbox_h[i] > yh - 5
              ]
              if len(b0) == len(frame_list):
                  if cid in [41, 42, 44, 45, 46]:
                      continue
                  max_w = max(bbox_w)
                  max_h = max(bbox_h)
                  for i, f in enumerate(frame_list):
                      if (
                          bbox_w[i] > max_w * BBOX_B
                          and bbox_h[i] > max_h * BBOX_B
                      ):
                          new_frame_list.append(f)
              else:
                  l_i, r_i = 0, len(frame_list) - 1
                  if len(b0) == 0:
                      continue
                  if b0[0] == 0:
                      for i in range(len(b0) - 1):
                          if b0[i] + 1 == b0[i + 1]:
                              l_i = b0[i + 1]
                          else:
                              break
                  if b0[-1] == len(frame_list) - 1:
                      for i in range(len(b0) - 1):
                          i = len(b0) - 1 - i
                          if b0[i] - 1 == b0[i - 1]:
                              r_i = b0[i - 1]
                          else:
                              break
  
                  max_lw, max_lh = bbox_w[l_i], bbox_h[l_i]
                  max_rw, max_rh = bbox_w[r_i], bbox_h[r_i]
                  for i, f in enumerate(frame_list):
                      if i < l_i:
                          if (
                              bbox_w[i] > max_lw * BBOX_B
                              and bbox_h[i] > max_lh * BBOX_B
                          ):
                              new_frame_list.append(f)
                      elif i > r_i:
                          if (
                              bbox_w[i] > max_rw * BBOX_B
                              and bbox_h[i] > max_rh * BBOX_B
                          ):
                              new_frame_list.append(f)
                      else:
                          new_frame_list.append(f)
              new_tracklet_dict = dict()
              for f in new_frame_list:
                  new_tracklet_dict[f] = tracklet_dict[f]
              new_mot_list[tracklet] = new_tracklet_dict
          else:
              new_mot_list[tracklet] = tracklet_dict
      return new_mot_list
  
file_path: PaddleDetection/deploy/pptracking/python/mot/mtmct/zone.py
imports: import os
  import cv2
  import numpy
label_desc: Use image node_id 6 for calling the Zone obj's underlying member method code with example usage: obj.filter_bbox(mot_list, cid) and returns: new_mot_list