code: def padding_image(img, height, width):
      height_old, width_old, _ = img.shape
      height_before = math.floor((height - height_old) / 2)
      height_after = height - height_old - height_before
  
      width_before = math.floor((width - width_old) / 2)
      width_after = width - width_old - width_before
  
      return np.pad(
          array=img,
          pad_width=(
              (height_before, height_after),
              (width_before, width_after),
              (0, 0),
          ),
          mode="constant",
      )
  
imports: import math
  from functools import reduce
  import numpy
  from visualdl.component.base_component import convert_to_HWC
label_desc: Use image node_id 1 for calling a global function with example usage: padding_image(img, height, width) and returns: np