class_docstr: First randomly rescale the image so that the longside and shortside of
  the image are around the bound; then jitter its aspect ratio.
  
  Required Keys:
  
  - img
  - img_shape
  - gt_bboxes (optional)
  - gt_polygons (optional)
  
  Modified Keys:
  
  - img
  - img_shape
  - gt_bboxes (optional)
  - gt_polygons (optional)
  
  Added Keys:
  
  - scale
  - scale_factor
  - keep_ratio
  
  Args:
      long_size_bound (int): The approximate bound for long size.
      short_size_bound (int): The approximate bound for short size.
      size_jitter_range (tuple(float, float)): Range of the ratio used
          to jitter the size. Defaults to (0.7, 1.3).
      aspect_ratio_jitter_range (tuple(float, float)): Range of the ratio
          used to jitter its aspect ratio. Defaults to (0.9, 1.1).
      resize_type (str): The type of resize class to use. Defaults to
          "Resize".
      **resize_kwargs: Other keyword arguments for the ``resize_type``.
code: def __init__(
      self,
      long_size_bound: int,
      short_size_bound: int,
      ratio_range: Tuple[float, float] = (0.7, 1.3),
      aspect_ratio_range: Tuple[float, float] = (0.9, 1.1),
      resize_type: str = "Resize",
      **resize_kwargs,
  ) -> None:
      super().__init__()
      self.ratio_range = ratio_range
      self.aspect_ratio_range = aspect_ratio_range
      self.long_size_bound = long_size_bound
      self.short_size_bound = short_size_bound
      self.resize_cfg = dict(type=resize_type, **resize_kwargs)
      # create an empty Reisize object
      self.resize_cfg.update(dict(scale=0))
      self.resize = TRANSFORMS.build(self.resize_cfg)
  
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 1 to create a new BoundedScaleAspectJitter object from inherited base classes: BaseTransform with example: obj = BoundedScaleAspectJitter(long_size_bound, short_size_bound, ratio_range, aspect_ratio_range, resize_type)