code: def btnstate(self, item= None):
          
          if not self.canvas.editing():
              return
  
          item = self.currentItem()
          if not item: # If not selected Item, take the first one
              item = self.labelList.item(self.labelList.count()-1)
  
          difficult = self.diffcButton.isChecked()
  
          try:
              shape = self.itemsToShapes[item]
          except:
              pass
          # Checked and Update
          try:
              if difficult != shape.difficult:
                  shape.difficult = difficult
                  self.setDirty()
              else:  # User probably changed item visibility
                  self.canvas.setShapeVisible(shape, item.checkState() == Qt.Checked)
          except:
              pass
docs: Function to handle difficult examples
          Update on each object