code: def setAnning(self, isAnning=True):
      if self.is_rect:
          return
      if isAnning:
          self.setAcceptHoverEvents(False)
          self.last_focse = self.polygon_hovering
          self.polygon_hovering = False
          self.anning = True
          self.setBrush(QtGui.QBrush(QtCore.Qt.NoBrush))
          self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, False)
          # self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, False)
          self.setFlag(
              QtWidgets.QGraphicsItem.ItemSendsGeometryChanges, False
          )
          self.setFlag(QtWidgets.QGraphicsItem.ItemIsFocusable, False)
          self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
          for line in self.m_lines:
              line.setAnning(False)
          for grip in self.m_items:
              grip.setAnning(False)
      else:
          self.setAcceptHoverEvents(True)
          self.anning = False
          if self.last_focse:
              self.polygon_hovering = True
              self.setBrush(self.insideColor)
          else:
              self.setBrush(self.halfInsideColor)
          self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)
          # self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, True)
          self.setFlag(
              QtWidgets.QGraphicsItem.ItemSendsGeometryChanges, True
          )
          self.setFlag(QtWidgets.QGraphicsItem.ItemIsFocusable, True)
          self.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
          for line in self.m_lines:
              line.setAnning(True)
          for grip in self.m_items:
              grip.setAnning(True)
  
imports: from qtpy import QtWidgets, QtGui, QtCore
  from .None import GripItem, LineItem, BBoxAnnotation
label_desc: Use image node_id 3 for calling the PolygonAnnotation obj's underlying member method code with example usage: obj.setAnning(isAnning) without return types