class_docstr: Add bottom-right padding to a raw image or annotation image.
  
  Args:
      target_size (list|tuple): The target size after padding.
      im_padding_value (list, optional): The padding value of raw image.
          Default: [127.5, 127.5, 127.5].
      label_padding_value (int, optional): The padding value of annotation image. Default: 255.
  
  Raises:
      TypeError: When target_size is neither list nor tuple.
      ValueError: When the length of target_size is not 2.
class_docstr_tok: ["Add","bottom-right","padding","to","a","raw","image","or","annotation","image",".","Args",":","target_size","(","list|tuple",")",":","The","target","size","after","padding",".","im_padding_value","(","list",",","optional",")",":","The","padding","value","of","raw","image",".","Default",":","[","127.5",",","127.5",",","127.5","]",".","label_padding_value","(","int",",","optional",")",":","The","padding","value","of","annotation","image",".","Default",":","255",".","Raises",":","TypeError",":","When","target_size","is","neither","list","nor","tuple",".","ValueError",":","When","the","length","of","target_size","is","not","2","."]
code: def __call__(self, data):
      im_height, im_width = data["img"].shape[0], data["img"].shape[1]
      target_height = self.target_size[1]
      target_width = self.target_size[0]
      pad_height = max(0, target_height - im_height)
      pad_width = max(0, target_width - im_width)
      data["trans_info"].append(("padding", data["img"].shape[0:2]))
      if (pad_height == 0) and (pad_width == 0):
          return data
      else:
          data["img"] = cv2.copyMakeBorder(
              data["img"],
              0,
              pad_height,
              0,
              pad_width,
              cv2.BORDER_CONSTANT,
              value=self.im_padding_value,
          )
          for key in data.get("gt_fields", []):
              if key in ["trimap", "alpha"]:
                  value = 0
              else:
                  value = self.im_padding_value
              data[key] = cv2.copyMakeBorder(
                  data[key],
                  0,
                  pad_height,
                  0,
                  pad_width,
                  cv2.BORDER_CONSTANT,
                  value=value,
              )
      return data
  
imports: import os
  import random
  import string
  import cv2
  import numpy
  from paddleseg.transforms import functional
  from paddleseg.cvlibs import manager
  from paddleseg.utils import seg_env
  from PIL import Image
label_desc: Use image node_id 2 for calling the Padding obj's underlying member method code with example usage: obj.__call__(data) and returns: data, data