code: def __call__(self, results):
      if np.random.random_sample() < self.rotate_ratio:
          image = results["image"]
          polygons = results["polys"]
          h, w = image.shape[:2]
  
          angle = self.sample_angle(self.max_angle)
          canvas_size = self.cal_canvas_size((h, w), angle)
          center_shift = (
              int((canvas_size[1] - w) / 2),
              int((canvas_size[0] - h) / 2),
          )
          image = self.rotate_img(image, angle, canvas_size)
          results["image"] = image
          # rotate polygons
          rotated_masks = []
          for mask in polygons:
              rotated_mask = self.rotate(
                  (w / 2, h / 2), mask, angle, center_shift
              )
              rotated_masks.append(rotated_mask)
          results["polys"] = np.array(rotated_masks)
  
      return results
  
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 6 for calling the RandomRotatePolyInstances obj's underlying member method code with example usage: obj.__call__(results) and returns: results