code: def rotate(self, theta):
      for i, p in enumerate(self.points):
          self.points[i] = self.rotatePoint(p, theta)
      self.direction -= theta
      self.direction = self.direction % (2 * math.pi)
  
imports: import math
  import sys
  from PyQt5.QtCore import QPointF
  from PyQt5.QtGui import QColor, QPen, QPainterPath, QFont
  from libs.utils import distance
label_desc: Use image node_id 2 for calling the Shape obj's underlying member method code with example usage: obj.rotate(theta) without return types