code: def mouseReleaseEvent(self, ev):
      if self.is_press and (
          self.rect_box[0] == self.rect_box[2]
          or self.rect_box[1] == self.rect_box[3]
      ):
          if len(self.polygon_items) != 0:
              self.polygon_items[-1].remove()
      self.is_press = False
      return super(AnnotationScene, self).mouseReleaseEvent(ev)
  
imports: from qtpy import QtWidgets, QtCore
  from qtpy.QtCore import Qt, QPointF
  from qtpy.QtGui import QPen, QColor
label_desc: Use image node_id 9 for calling the AnnotationScene obj's underlying member method code with example usage: obj.mouseReleaseEvent(ev) and returns: super