class_docstr: Random Rotate Image
  Args:
      scale (float, tuple, list): rotate scale
      scale_mode (str): mode of scale, [range, value, None]
      angle (float, tuple, list): rotate angle
      angle_mode (str): mode of angle, [range, value, None]
      fill_value (float, tuple, list): fill value
      rotate_prob (float): probability of rotation
      auto_bound (bool): whether auto bound or not
class_docstr_tok: ["Random","Rotate","Image","Args",":","scale","(","float",",","tuple",",","list",")",":","rotate","scale","scale_mode","(","str",")",":","mode","of","scale",",","[","range",",","value",",","None","]","angle","(","float",",","tuple",",","list",")",":","rotate","angle","angle_mode","(","str",")",":","mode","of","angle",",","[","range",",","value",",","None","]","fill_value","(","float",",","tuple",",","list",")",":","fill","value","rotate_prob","(","float",")",":","probability","of","rotation","auto_bound","(","bool",")",":","whether","auto","bound","or","not"]
code: def get_scale(self, scale, scale_mode):
      assert not scale_mode or scale_mode in [
          "range",
          "value",
      ], "scale mode should be in [range, value, None]"
      if not scale_mode:
          return scale
      elif scale_mode == "range":
          low, high = scale
          return np.random.rand() * (high - low) + low
      elif scale_mode == "value":
          return np.random.choice(scale)
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  from numbers import Number, Integral
  import cv2
  import numpy
  import math
  import copy
  from .operators import register_op, BaseOperator
  from ppdet.modeling.rbox_utils import poly2rbox_le135_np, poly2rbox_oc_np, rbox2poly_np
  from ppdet.utils.logger import setup_logger
  from ppdet.utils.compact import imagedraw_textsize_c
label_desc: Use image node_id 3 for calling the RandomRRotate obj's underlying member method code with example usage: obj.get_scale(scale, scale_mode) and returns: scale, unknown, np