code: def addRotatedShape(cx, cy, w, h, angle):
      p0x, p0y = rotatePoint(cx, cy, cx - w / 2, cy - h / 2, -angle)
      p1x, p1y = rotatePoint(cx, cy, cx + w / 2, cy - h / 2, -angle)
      p2x, p2y = rotatePoint(cx, cy, cx + w / 2, cy + h / 2, -angle)
      p3x, p3y = rotatePoint(cx, cy, cx - w / 2, cy + h / 2, -angle)
  
      points = [[p0x, p0y], [p1x, p1y], [p2x, p2y], [p3x, p3y]]
  
      return points
  
imports: import os
  import re
  import itertools
  import cv2
  import time
  import numpy
  import torch
  from torch.autograd import Variable
  from utils.craft_utils import getDetBoxes, adjustResultCoordinates
  from data import imgproc
  from data.dataset import SynthTextDataSet
  import math
  import xml.etree.ElementTree
label_desc: Use image node_id 2 for calling a global function with example usage: addRotatedShape(cx, cy, w, h, angle) and returns: points