before_length = list(np.array(events["durations"])[events["onsets_time"]<before])[:number]