code: def draw_boxes(image, boxes, scores=None, drop_score=0.5):
      img = image.copy()
      draw = ImageDraw.Draw(img)
      if scores is None:
          scores = [1] * len(boxes)
      for box, score in zip(boxes, scores):
          if score < drop_score:
              continue
          draw.line(
              [(box[0][0], box[0][1]), (box[1][0], box[1][1])],
              fill="red",
          )
          draw.line(
              [(box[1][0], box[1][1]), (box[2][0], box[2][1])],
              fill="red",
          )
          draw.line(
              [(box[2][0], box[2][1]), (box[3][0], box[3][1])],
              fill="red",
          )
          draw.line(
              [(box[3][0], box[3][1]), (box[0][0], box[0][1])],
              fill="red",
          )
          draw.line(
              [
                  (box[0][0] - 1, box[0][1] + 1),
                  (box[1][0] - 1, box[1][1] + 1),
              ],
              fill="red",
          )
          draw.line(
              [
                  (box[1][0] - 1, box[1][1] + 1),
                  (box[2][0] - 1, box[2][1] + 1),
              ],
              fill="red",
          )
          draw.line(
              [
                  (box[2][0] - 1, box[2][1] + 1),
                  (box[3][0] - 1, box[3][1] + 1),
              ],
              fill="red",
          )
          draw.line(
              [
                  (box[3][0] - 1, box[3][1] + 1),
                  (box[0][0] - 1, box[0][1] + 1),
              ],
              fill="red",
          )
      return img
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import cv2
  import numpy
  import pyclipper
  from PIL import ImageDraw
  from shapely.geometry import Polygon
label_desc: Use image node_id 1 for calling a global function with example usage: draw_boxes(image, boxes, scores, drop_score) and returns: img