class_docstr: Rotate Image, Polygon, Box
  
  Args:
      scale (float): rotate scale
      angle (float): rotate angle
      fill_value (int, tuple): fill color
      auto_bound (bool): whether auto bound or not
class_docstr_tok: ["Rotate","Image",",","Polygon",",","Box","Args",":","scale","(","float",")",":","rotate","scale","angle","(","float",")",":","rotate","angle","fill_value","(","int",",","tuple",")",":","fill","color","auto_bound","(","bool",")",":","whether","auto","bound","or","not"]
code: def apply(self, sample, context=None):
      image = sample["image"]
      h, w = image.shape[:2]
      matrix, h, w = self.get_rotated_matrix(
          self.angle, self.scale, h, w
      )
      sample["image"] = self.apply_image(image, matrix, h, w)
      polys = sample["gt_poly"]
      # TODO: segment or keypoint to be processed
      if len(polys) > 0:
          pts = self.apply_pts(polys, matrix, h, w)
          sample["gt_poly"] = pts
          sample["gt_bbox"] = self.get_rect_from_pts(pts, h, w)
  
      return sample
  
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 6 for calling the RRotate obj's underlying member method code with example usage: obj.apply(sample, context) and returns: sample