code: def drawBoxes(
      image, boxes, color=(255, 0, 0), thickness=5, boxes_format="boxes"
  ):
      """Draw boxes onto an image.
  
      Args:
          image: The image on which to draw the boxes.
          boxes: The boxes to draw.
          color: The color for each box.
          thickness: The thickness for each box.
          boxes_format: The format used for providing the boxes. Options are
              "boxes" which indicates an array with shape(N, 4, 2) where N is the
              number of boxes and each box is a list of four points) as provided
              by `keras_ocr.detection.Detector.detect`, "lines" (a list of
              lines where each line itself is a list of (box, character) tuples) as
              provided by `keras_ocr.data_generation.get_image_generator`,
              or "predictions" where boxes is by itself a list of (word, box) tuples
              as provided by `keras_ocr.pipeline.Pipeline.recognize` or
              `keras_ocr.recognition.Recognizer.recognize_from_boxes`.
      """
      if len(boxes) == 0:
          return image
      canvas = image.copy()
      if boxes_format == "lines":
          revised_boxes = []
          for line in boxes:
              for box, _ in line:
                  revised_boxes.append(box)
          boxes = revised_boxes
      if boxes_format == "predictions":
          revised_boxes = []
          for _, box in boxes:
              revised_boxes.append(box)
          boxes = revised_boxes
      for box in boxes:
          cv2.polylines(
              img=canvas,
              pts=box[np.newaxis].astype("int32"),
              color=color,
              thickness=thickness,
              isClosed=True,
          )
      return canvas
  
imports: import os
  import io
  import typing
  import hashlib
  import urllib.request
  import urllib.parse
  import cv2
  import imgaug
  import numpy
  import validators
  import typing_extensions
  import matplotlib.pyplot
  from shapely import geometry
  from scipy import spatial
label_desc: Use image node_id 7 for calling a global function with example usage: drawBoxes(image, boxes, color, thickness, boxes_format) and returns: canvas, image