<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_selected_events(self, time_selection=None):
 """Returns which events are present in one time window. Parameters time_selection : tuple of float start and end of the window of interest Returns ------- list of dict list of events in the window of interest """

        events = []
        for checkbox in self.idx_eventtype_list:
            if checkbox.checkState() == Qt.Checked:
                events.extend(self.annot.get_events(name=checkbox.text(),
                                                    time=time_selection))

        return events