code: def get_annotated_data_x_y(timestamps, data, lbls):
          
  
          timestamps = np.array(timestamps)
  
          timestamp_step = timestamps[3]-timestamps[2]
          current_new_timestamp = 0.0
          new_timestamps = []
  
          X = None
          Y = []
          classes = []
  
          for i in range(0, len(timestamps)):
  
              for lbl in lbls:
                  if lbl.start_seconds <= timestamps[i] < lbl.end_seconds:
                      if X is None:
                          X = data[i, :]
                      else:
                          X = np.vstack((X, data[i, :]))
                      Y.append(lbl.label)
                      new_timestamps.append(current_new_timestamp)
                      current_new_timestamp += timestamp_step
  
                      if lbl.label not in classes:
                          classes.append(lbl.label)
  
          return X, Y, classes, new_timestamps
docs: DOESN'T work with OVERLAPPING labels
  
          :param timestamps:
          :param data:
          :param lbls:
          :return: