code: def draw_bounding_box_on_image(image_path, data_list, save_dir):
      image = Image.open(image_path)
      draw = ImageDraw.Draw(image)
      for data in data_list:
          left, right, top, bottom = (
              data["left"],
              data["right"],
              data["top"],
              data["bottom"],
          )
          # draw bbox
          draw.line(
              [
                  (left, top),
                  (left, bottom),
                  (right, bottom),
                  (right, top),
                  (left, top),
              ],
              width=2,
              fill="red",
          )
          # draw label
          if image.mode == "RGB":
              text = data["label"] + ": %.2f%%" % (
                  100 * data["confidence"]
              )
              textsize_width, textsize_height = draw.textsize(text=text)
              draw.rectangle(
                  xy=(
                      left,
                      top - (textsize_height + 5),
                      left + textsize_width + 10,
                      top,
                  ),
                  fill=(255, 255, 255),
              )
              draw.text(xy=(left, top - 15), text=text, fill=(0, 0, 0))
  
      save_name = get_save_image_name(image, save_dir, image_path)
      if os.path.exists(save_name):
          os.remove(save_name)
  
      image.save(save_name)
      return save_name
  
file_path: PaddleHub/modules/image/object_detection/yolov3_resnet34_coco2017/processor.py
imports: import base64
  import os
  import cv2
  import numpy
  from PIL import Image, ImageDraw
label_desc: Use image node_id 4 for calling a global function with example usage: draw_bounding_box_on_image(image_path, data_list, save_dir) and returns: save_name