docstr: Random scale the image while keeping aspect.
  
  Args:
      size (int) : Base size before scaling.
      scale (tuple(float)) : The range of scaling.
docstr_tok: ["Random","scale","the","image","while","keeping","aspect",".","Args",":","size","(","int",")",":","Base","size","before","scaling",".","scale","(","tuple","(","float",")",")",":","The","range","of","scaling","."]
code: def __init__(self, size=800, scale=(3.0 / 4, 5.0 / 2), **kwargs):
      """Random scale the image while keeping aspect.
  
      Args:
          size (int) : Base size before scaling.
          scale (tuple(float)) : The range of scaling.
      """
      assert isinstance(size, int)
      assert isinstance(scale, float) or isinstance(scale, tuple)
      self.size = size
      self.scale = (
          scale if isinstance(scale, tuple) else (1 - scale, 1 + scale)
      )
  
imports: import numpy
  from PIL import Image, ImageDraw
  import cv2
  from shapely.geometry import Polygon
  import math
  from ppocr.utils.poly_nms import poly_intersection
label_desc: Use image node_id 1 to create a new RandomScaling object  with example: obj = RandomScaling(size, scale)