code: def remove_event(self, name=None, time=None, chan=None):
          
          events = self.rater.find('events')
          if name is not None:
              pattern = "event_type[@type='" + name + "']"
          else:
              pattern = "event_type"
  
          if chan is not None:
              if isinstance(chan, (tuple, list)):
                  chan = ', '.join(chan)
  
          for e_type in list(events.iterfind(pattern)):
  
              for e in e_type:
  
                  event_start = float(e.find('event_start').text)
                  event_end = float(e.find('event_end').text)
                  event_chan = e.find('event_chan').text
  
                  if time is None:
                      time_cond = True
                  else:
                      time_cond = allclose(time[0], event_start) and allclose(
                              time[1], event_end)
  
                  if chan is None:
                      chan_cond = True
                  else:
                      chan_cond = event_chan == chan
  
                  if time_cond and chan_cond:
                      e_type.remove(e)
  
          self.save()
docs: get events inside window.