code: def draw_bbox_and_label(
      x: torch.Tensor, label: str, img: np.ndarray
  ) -> np.ndarray:
      """
      Draws the predicted bounding boxes on the original image.
      """
      x1, y1, x2, y2 = tuple(map(int, x))
      if x is not None:
          img = cv.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 1)
      t_size = cv.getTextSize(label, cv.FONT_HERSHEY_PLAIN, 1, 1)[0]
      c2 = (x1 + t_size[0] + 3, y1 + t_size[1] + 4)
      img = cv.putText(
          img,
          label,
          (x1, y1 + t_size[1] + 4),
          cv.FONT_HERSHEY_PLAIN,
          1,
          (0, 0, 255),
          1,
      )
  
      return img
  
file_path: ImageAI/imageai/yolov3/utils.py
imports: import math
  from typing import Union, List, Tuple
  import torch
  import numpy
  import cv2
  from torchvision.ops import batched_nms
label_desc: Use image node_id 1 for calling a global function with example usage: draw_bbox_and_label(x, label, img) and returns: img