class_docstr: Pad Image to target size. It will randomly crop an area from the
  original image and resize it to the target size, then paste the original
  image to its top left corner.
  
  Required Keys:
  
  - img
  
  Modified Keys:
  
  - img
  - img_shape
  
  Added Keys:
  - pad_shape
  - pad_fixed_size
  
  Args:
      target_scale (int or tuple[int, int]]): The target size of padded
          image. If it's an integer, then the padding size would be
          (target_size, target_size). If it's tuple, then ``target_scale[0]``
          should be the width and ``target_scale[1]`` should be the height.
          The size of the padded image will be (target_scale[1],
          target_scale[0])
      crop_ratio (float or Tuple[float, float]): Relative size for the
          crop region. If ``crop_ratio`` is a float, then the initial crop
          size would be
          ``(crop_ratio * img.shape[0], crop_ratio * img.shape[1])`` . If
          ``crop_ratio`` is a tuple, then ``crop_ratio[0]`` is for the width
          and ``crop_ratio[1]`` is for the height. The initial crop size
          would be
          ``(crop_ratio[1] * img.shape[0], crop_ratio[0] * img.shape[1])``.
          Defaults to 1./9.
code: def __repr__(self) -> str:
      repr_str = self.__class__.__name__
      repr_str += f"(target_scale = {self.target_scale}, "
      repr_str += f"crop_ratio = {self.crop_ratio})"
      return repr_str
  
imports: import math
  import random
  from typing import Dict, List, Sequence, Tuple, Union
  import cv2
  import mmcv
  import numpy
  from mmcv.transforms import RandomFlip
  from mmcv.transforms.base import BaseTransform
  from mmcv.transforms.utils import avoid_cache_randomness, cache_randomness
  from shapely.geometry import Polygon
  from mmocr.registry import TRANSFORMS
  from mmocr.utils import crop_polygon, poly2bbox, poly_intersection
label_desc: Use image node_id 3 for calling the SourceImagePad obj's underlying member method code with example usage: obj.__repr__() and returns: repr_str