code: def cal_canvas_size(self, ori_size, degree):
      assert isinstance(ori_size, tuple)
      angle = degree * math.pi / 180.0
      h, w = ori_size[:2]
  
      cos = math.cos(angle)
      sin = math.sin(angle)
      canvas_h = int(w * math.fabs(sin) + h * math.fabs(cos))
      canvas_w = int(w * math.fabs(cos) + h * math.fabs(sin))
  
      canvas_size = (canvas_h, canvas_w)
      return canvas_size
  
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 3 for calling the RandomRotatePolyInstances obj's underlying member method code with example usage: obj.cal_canvas_size(ori_size, degree) and returns: canvas_size