def create_intervals(data_len, interval_no):
    """
    split the interval [0, data_len] into a list of equal intervals
    :param data_len: length of the data
    :param interval_no: number of intervals to be split into
    :return: list of intervals (start, end)
    """
    step = data_len // interval_no
    intervals = []
    for start in range(0, data_len - step + 1, step):
        end = start + step
        if data_len - (end + step) < 0:
            end = data_len
        intervals.append((start, end))
    return intervals