code: def boxPad(box, imgShape, pad: int) -> np.array:
      """
      Pad a box with [pad] pixels on each side.
      """
      box = np.array(box, dtype=np.int32)
      box[0][0], box[0][1] = box[0][0] - pad, box[0][1] - pad
      box[1][0], box[1][1] = box[1][0] + pad, box[1][1] - pad
      box[2][0], box[2][1] = box[2][0] + pad, box[2][1] + pad
      box[3][0], box[3][1] = box[3][0] - pad, box[3][1] + pad
      h, w, _ = imgShape
      box[:, 0] = np.clip(box[:, 0], 0, w)
      box[:, 1] = np.clip(box[:, 1], 0, h)
      return box
  
imports: import hashlib
  import os
  import re
  import sys
  from math import sqrt
  import cv2
  import numpy
  from PyQt5.QtCore import QRegExp, QT_VERSION_STR
  from PyQt5.QtGui import QIcon, QRegExpValidator, QColor
  from PyQt5.QtWidgets import QPushButton, QAction, QMenu
  from libs.ustr import ustr
label_desc: Use image node_id 12 for calling a global function with example usage: boxPad(box, imgShape, pad) and returns: box