code: def remove_straddlers(events, time, s_freq, toler=0.1):
      
      dur = (events[:, -1] - 1 - events[:, 0]) / s_freq
      continuous = time[events[:, -1] - 1] - time[events[:, 0]] - dur < toler
      
      return events[continuous, :]
docs: Reject an event if it straddles a stitch, by comparing its 
      duration to its timespan.
  
      Parameters
      ----------
      events : ndarray (dtype='int')
          N x M matrix with start, ..., end samples
      time : ndarray (dtype='float')
          vector with time points
      s_freq : float
          sampling frequency
      toler : float, def=0.1
          maximum tolerated difference between event duration and timespan
  
      Returns
      -------
      ndarray (dtype='int')
          N x M matrix with start , ..., end samples