code: def addRect(self, p, size, hand_rect=False):
      p1 = QtCore.QPointF(p.x() + size.width(), p.y())
      p2 = QtCore.QPointF(p.x() + size.width(), p.y() + size.height())
      p3 = QtCore.QPointF(p.x(), p.y() + size.height())
      for idx, pi in enumerate([p, p1, p2, p3]):
          self.addPointLast(pi, idx % 2 == 0)
      self.hand_rect = hand_rect
  
imports: from qtpy import QtWidgets, QtGui, QtCore
  from .None import GripItem, LineItem, BBoxAnnotation
label_desc: Use image node_id 6 for calling the PolygonAnnotation obj's underlying member method code with example usage: obj.addRect(p, size, hand_rect) without return types