class_docstr: First rescale the image for its shorter side to reach the short_size and
  then jitter its aspect ratio, final rescale the shape guaranteed to be
  divided by scale_divisor.
  
  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:
      short_size (int): Target shorter size before jittering the aspect
          ratio. Defaults to 736.
      short_size_jitter_range (tuple(float, float)): Range of the ratio used
          to jitter the target shorter 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).
      scale_divisor (int): The scale divisor. Defaults to 1.
      resize_type (str): The type of resize class to use. Defaults to
          "Resize".
      **resize_kwargs: Other keyword arguments for the ``resize_type``.
docstr: A ratio will be randomly sampled from the range specified by
  ``range``.
  
  Args:
      ratio_range (tuple[float]): The minimum and maximum ratio.
  
  Returns:
      float: A ratio randomly sampled from the range.
docstr_tok: ["A","ratio","will","be","randomly","sampled","from","the","range","specified","by","``","range","``",".","Args",":","ratio_range","(","tuple","[","float","]",")",":","The","minimum","and","maximum","ratio",".","Returns",":","float",":","A","ratio","randomly","sampled","from","the","range","."]
code: def _sample_from_range(self, range: Tuple[float, float]) -> float:
      """A ratio will be randomly sampled from the range specified by
      ``range``.
  
      Args:
          ratio_range (tuple[float]): The minimum and maximum ratio.
  
      Returns:
          float: A ratio randomly sampled from the range.
      """
      min_value, max_value = min(range), max(range)
      value = (
          np.random.random_sample() * (max_value - min_value)
          + min_value
      )
      return value
  
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 2 for calling the ShortScaleAspectJitter obj's underlying member method code with example usage: obj._sample_from_range(range) and returns: value