code: def draw_bboxes(
      image: t.Union[pilimage.Image, np.ndarray],
      bboxes: np.ndarray,
      label_map: LabelMap,
      bbox_notation: t.Optional[str] = None,
      copy_image: bool = True,
      border_width: int = 1,
      color: t.Union[str, t.Dict[np.number, str]] = "red",
  ) -> pilimage.Image:
      """Draw bboxes on the image.
  
      Parameters
      ----------
      image : Union[PIL.Image.Image, numpy.ndarray]
          image to draw on
      bboxes : numpy.ndarray
          array of bboxes
      label_map: LabelMap
          Map of class id to label
      bbox_notation
      copy_image : bool, default True
          copy image before drawing or not
      border_width : int, default 1
          width of the bbox outline
      color: Union[str, Dict[number, str]], default "red"
          color of the bbox outline. It could be a map mapping class id to the color
  
      Returns
      -------
      PIL.Image.Image : image instance with drawen bboxes on it
      """
      if bboxes.size == 0:
          return image
  
      image = ensure_image(image, copy=copy_image)
      draw = pildraw.ImageDraw(image)
  
      if len(bboxes.shape) == 1:
          bboxes = [bboxes]
      if bbox_notation is not None:
          bboxes = np.array(
              [
                  convert_bbox(
                      bbox,
                      notation=bbox_notation,
                      image_width=image.width,
                      image_height=image.height,
                      _strict=False,
                  ).tolist()
                  for bbox in bboxes
              ]
          )
      for bbox in bboxes:
          clazz, x0, y0, w, h = bbox
          x1, y1 = x0 + w, y0 + h
          text = label_map[clazz]
  
          if isinstance(color, str):
              color_to_use = color
          elif isinstance(color, dict):
              color_to_use = color[clazz]
          else:
              raise TypeError(
                  "color must be of type - Union[str, Dict[int, str]]"
              )
  
          font = get_font_with_size(text, min(w, image.width // 2))
          draw.rectangle(
              xy=(x0, y0, x1, y1),
              width=border_width,
              outline=color_to_use,
          )
          draw.text(
              xy=(x0 + 2, y0),
              text=text,
              fill="white",
              font=font,
              stroke_width=2,
              stroke_fill="black",
          )
  
      return image
  
imports: import io
  import typing
  from numbers import Number
  from pathlib import Path
  import cv2
  import numpy
  import PIL.Image
  import PIL.ImageDraw
  import PIL.ImageOps
  import plotly.graph_objects
  from PIL import ImageColor, ImageFont
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.utils.html import imagetag
  from deepchecks.vision.vision_data import TaskType
  from deepchecks.vision.vision_data.utils import LabelMap
  from .detection_formatters import convert_bbox
label_desc: Use image node_id 3 for calling a global function with example usage: draw_bboxes(image, bboxes, label_map, bbox_notation, copy_image, border_width, color) and returns: image, image