def split_dataset_sizes(stream_list, split_sizes):
    """Splits with different sizes

    Args:
        stream_list (list): list of stream path
        split_sizes (list): batch size per worker
    """
    out = []
    start = 0
    total = sum(split_sizes)
    for split_size in split_sizes[:-1]:
        num = int(split_size / total * len(stream_list))
        end = start + num
        out.append(stream_list[start:end])
        start = end
    out.append(stream_list[start:])
    return out