def METHOD_NAME(bboxes, thresh, delta=0, nms_id=2):
    """
    One-dimensional non-maximal suppression
    :param bboxes: [[vid, label, st, ed, score, ...], ...]
    :param thresh:
    :return:
    """
    """
    t1 = bboxes[:, 0]
    t2 = bboxes[:, 1]
    scores = bboxes[:, nms_id]
    """
    t1 = np.array([max(0, x[0] - delta) for x in bboxes])
    t2 = np.array([x[1] + delta for x in bboxes])
    scores = np.array([x[nms_id] for x in bboxes])
    durations = t2 - t1
    order = scores.argsort()[::-1]
    keep = []
    while order.size > 0:
        i = order[0]
        keep.append(i)
        tt1 = np.maximum(t1[i], t1[order[1:]])
        tt2 = np.minimum(t2[i], t2[order[1:]])
        intersection = tt2 - tt1
        IoU = intersection / (durations[i] + durations[order[1:]] - intersection).astype(float)
        inds = np.where(IoU <= thresh)[0]
        order = order[inds + 1]
    return [bboxes[i] for i in keep]