code: def padding(bbox, img_shape, pad_scale=0.0):
      """pad bbox with scale
  
      Args:
          bbox (list):[x1, y1, x2, y2]
          img_shape (tuple): (height, width)
          pad_scale (float): scale for padding
  
      Returns:
          bbox (list)
      """
      x1, y1, x2, y2 = bbox
      w, h = x2 - x1 + 1, y2 - y1 + 1
      dw = int(w * pad_scale)
      dh = int(h * pad_scale)
      x1 = max(0, x1 - dw)
      x2 = min(img_shape[1], x2 + dw)
      y1 = max(0, y1 - dh)
      y2 = min(img_shape[0], y2 + dh)
      return [int(x1), int(y1), int(x2), int(y2)]
  
imports: import numpy
  from PIL import Image, ImageDraw
label_desc: Use image node_id 2 for calling a global function with example usage: padding(bbox, img_shape, pad_scale) and returns: list