code: def set_stage_index(self):
          
          window_start = self.parent.value('window_start')
          window_length = self.parent.value('window_length')
          stage = self.annot.get_stage_for_epoch(window_start, window_length)
          #lg.info('winstart: ' + str(window_start) + ', stage: ' + str(stage))
  
          if stage is None:
              self.idx_stage.setCurrentIndex(-1)
          else:
              self.idx_stage.setCurrentIndex(STAGE_NAME.index(stage))
docs: Set the current stage in combobox.