code: def draw_box(image_file, results, class_label, threshold=0.5):
      """
      draw_box func
      """
      srcimg = cv2.imread(image_file, 1)
      for i in range(len(results)):
          color_list = get_color_map_list(len(class_label))
          clsid2color = {}
          classid, conf = int(results[i, 0]), results[i, 1]
          if conf < threshold:
              continue
          xmin, ymin, xmax, ymax = (
              int(results[i, 2]),
              int(results[i, 3]),
              int(results[i, 4]),
              int(results[i, 5]),
          )
  
          if classid not in clsid2color:
              clsid2color[classid] = color_list[classid]
          color = tuple(clsid2color[classid])
  
          cv2.rectangle(
              srcimg, (xmin, ymin), (xmax, ymax), color, thickness=2
          )
          print(class_label[classid] + ": " + str(round(conf, 3)))
          cv2.putText(
              srcimg,
              class_label[classid] + ":" + str(round(conf, 3)),
              (xmin, ymin - 10),
              cv2.FONT_HERSHEY_SIMPLEX,
              0.8,
              (0, 255, 0),
              thickness=2,
          )
      return srcimg
  
imports: import os
  import argparse
  import time
  import sys
  import cv2
  import numpy
  import paddle
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from ppdet.core.workspace import load_config, create
  from ppdet.metrics import COCOMetric
  from post_process import PPYOLOEPostProcess
label_desc: Use image node_id 5 for calling a global function with example usage: draw_box(image_file, results, class_label, threshold) and returns: srcimg