class_docstr: Padding input into targeted size according to specific padding value.
  
  Args:
      target_size(Union[List[int], Tuple[int], int]): Targeted image size.
      im_padding_value(list): Border value for 3 channels, default is [127.5, 127.5, 127.5].
class_docstr_tok: ["Padding","input","into","targeted","size","according","to","specific","padding","value",".","Args",":","target_size","(","Union","[","List","[","int","]",",","Tuple","[","int","]",",","int","]",")",":","Targeted","image","size",".","im_padding_value","(","list",")",":","Border","value","for","3","channels",",","default","is","[","127.5",",","127.5",",","127.5","]","."]
code: def __call__(self, im: np.ndarray):
      im_height, im_width = im.shape[0], im.shape[1]
      if isinstance(self.target_size, int):
          target_height = self.target_size
          target_width = self.target_size
      else:
          target_height = self.target_size[1]
          target_width = self.target_size[0]
      pad_height = target_height - im_height
      pad_width = target_width - im_width
      if pad_height < 0 or pad_width < 0:
          raise ValueError(
              "the size of image should be less than target_size, but the size of image ({}, {}), is larger than target_size ({}, {})".format(
                  im_width, im_height, target_width, target_height
              )
          )
      else:
          im = cv2.copyMakeBorder(
              im,
              0,
              pad_height,
              0,
              pad_width,
              cv2.BORDER_CONSTANT,
              value=self.im_padding_value,
          )
  
      return im
  
imports: import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import PIL
  import numpy
  import paddlehub.vision.functional
label_desc: Use image node_id 2 for calling the Padding obj's underlying member method code with example usage: obj.__call__(im) and returns: im