code: def crop_image_with_mot(input, mot_res, expand=True):
      res = mot_res["boxes"]
      crop_res = []
      new_bboxes = []
      ori_bboxes = []
      for box in res:
          if expand:
              crop_image, new_bbox, ori_bbox = expand_crop(
                  input, box[1:]
              )
          else:
              crop_image, new_bbox, ori_bbox = normal_crop(
                  input, box[1:]
              )
          if crop_image is not None:
              crop_res.append(crop_image)
              new_bboxes.append(new_bbox)
              ori_bboxes.append(ori_bbox)
      return crop_res, new_bboxes, ori_bboxes
  
imports: import time
  import os
  import ast
  import glob
  import yaml
  import copy
  import numpy
  import subprocess
  from python.keypoint_preprocess import EvalAffine, TopDownEvalAffine, expand_crop
label_desc: Use image node_id 4 for calling a global function with example usage: crop_image_with_mot(input, mot_res, expand) and returns: crop_res,  new_bboxes,  ori_bboxes