def METHOD_NAME(dataset, lengths):
    from deeplake.enterprise.convert_to_libdeeplake import import_indra_api
    import_indra_api()
    if math.isclose(sum(lengths), 1) and sum(lengths) <= 1:
        lengths = calculate_absolute_lengths(lengths, len(dataset))
    if sum(lengths) != len(dataset):  # type: ignore[arg-type]
        raise ValueError(
            "Sum of input lengths does not equal the length of the input dataset!"
        )
    primary_tensor = find_primary_tensor(dataset)
    schedule = create_fetching_schedule(
        dataset, primary_tensor, shuffle_within_chunks=True
    )
    ds = dataset.no_view_dataset
    sliced_ds = ds[schedule]
    views = []
    start = 0
    for length in lengths:
        end = start + length
        view = sliced_ds[start:end]
        views.append(view)
        start = end
    return views