/**
 * Given a list of data and a tuple of indices, this function returns a tuple containing the slices of the list at the given indices.
 *
 * @param data The list to be sliced.
 * @param indices A tuple of indices at which to slice the list.
 * @return A tuple containing the slices of the list at the given indices.
 */
fun sliceAndIndex(data: List<Any>, indices: List<Int>): List<List<Any>> {

    val result = mutableListOf<List<Any>>()

    // Iterate over the indices
    for (index in indices) {
        val slicedList = if (index < 0) {
            // Negative index handling
            data.slice(index until data.size)
        } else {
            // Normal slicing
            data.slice(0..index)
        }
        result.add(slicedList)
    }

    return result
}
/**
 * Given a list of data and a tuple of indices, this function returns a tuple containing the slices of the list at the given indices.
 *
 * @param data The list to be sliced.
 * @param indices A tuple of indices at which to slice the list.
 * @return A tuple containing the slices of the list at the given indices.
 */
fun sliceAndIndex(data: List<Any>, indices: List<Int>): List<List<Any>> {
/**
 * Given a list of data and a tuple of indices, this function returns a tuple containing the slices of the list at the given indices.
 *
 * @param data The list to be sliced.
 * @param indices A tuple of indices at which to slice the list.
 * @return A tuple containing the slices of the list at the given indices.
 */
fun sliceAndIndex(data: List<Any>, indices: List<Int>): List<List<Any>> {

    val result = mutableListOf<List<Any>>()

    // Iterate over the indices
    for (index in indices) {
        val slicedList = if (index < 0) {
            // Negative index handling
            data.slice(index until data.size)
        } else {
            // Normal slicing
            data.slice(0..index)
        }
        result.add(slicedList)
    }

    return result
}