code: def enable_events(self):
          
          if self.annot is not None and self.parent.channels.groups:
              self.action['spindle'].setEnabled(True)
              self.action['slow_wave'].setEnabled(True)
              self.action['analyze'].setEnabled(True)
          else:
              self.action['spindle'].setEnabled(False)
              self.action['slow_wave'].setEnabled(False)
              self.action['analyze'].setEnabled(False)
docs: enable slow wave and spindle detection if both
          annotations and channels are active.