code: def pad_image(image, pad_size, order="CHW"):
      """
      Pad the given image with the size of pad_size.
      Args:
          image (array): image to pad.
          pad_size (int): size to pad.
          order (str): order of the `height`, `channel` and `width`.
      Returns:
          img (array): padded image.
      """
      if order == "CHW":
          img = np.pad(
              image,
              ((0, 0), (pad_size, pad_size), (pad_size, pad_size)),
              mode=str("constant"),
          )
      elif order == "HWC":
          img = np.pad(
              image,
              ((pad_size, pad_size), (pad_size, pad_size), (0, 0)),
              mode=str("constant"),
          )
      return img
  
imports: import math
  import numpy
  import cv2
label_desc: Use image node_id 12 for calling a global function with example usage: pad_image(image, pad_size, order) and returns: img