code: def affine_transform_bbox(bbox, trans, width, height):
      bbox = np.array(copy.deepcopy(bbox), dtype=np.float32)
      bbox[:2] = affine_transform(bbox[:2], trans)
      bbox[2:] = affine_transform(bbox[2:], trans)
      bbox[[0, 2]] = np.clip(bbox[[0, 2]], 0, width - 1)
      bbox[[1, 3]] = np.clip(bbox[[1, 3]], 0, height - 1)
      return bbox
  
imports: import os
  import copy
  import math
  import time
  import yaml
  import cv2
  import numpy
  from collections import defaultdict
  import paddle
  from benchmark_utils import PaddleInferBenchmark
  from utils import gaussian_radius, gaussian2D, draw_umich_gaussian
  from preprocess import preprocess, decode_image, WarpAffine, NormalizeImage, Permute
  from utils import argsparser, Timer, get_current_memory_mb
  from infer import Detector, get_test_images, print_arguments, bench_log, PredictConfig
  from keypoint_preprocess import get_affine_transform
  import sys
  from pptracking.python.mot import CenterTracker
  from pptracking.python.mot.utils import MOTTimer, write_mot_results
  from pptracking.python.mot.visualize import plot_tracking
label_desc: Use image node_id 3 for calling a global function with example usage: affine_transform_bbox(bbox, trans, width, height) and returns: bbox