code: def display_eventtype(self):
          
          if self.annot is not None:
              event_types = sorted(self.annot.event_types, key=str.lower)
          else:
              event_types = []
  
          self.idx_eventtype.clear()
  
          evttype_group = QGroupBox('Event Types')
          layout = QVBoxLayout()
          evttype_group.setLayout(layout)
          
          self.check_all_eventtype = check_all = QCheckBox('All event types')
          check_all.setCheckState(Qt.Checked)
          check_all.clicked.connect(self.toggle_eventtype)
          layout.addWidget(check_all)
  
          self.idx_eventtype_list = []
          for one_eventtype in event_types:
              self.idx_eventtype.addItem(one_eventtype)
              item = QCheckBox(one_eventtype)
              layout.addWidget(item)
              item.setCheckState(Qt.Checked)
              item.stateChanged.connect(self.update_annotations)
              item.stateChanged.connect(self.toggle_check_all_eventtype)
              self.idx_eventtype_list.append(item)
  
          self.idx_eventtype_scroll.setWidget(evttype_group)
docs: Read the list of event types in the annotations and update widgets.