/**
 * Given a list of tuples and start/end indices, returns a sublist containing the elements
 * from each tuple in the specified range.
 *
 * @param tupleList A list of tuples.
 * @param startIndex The starting index (inclusive) of the sublist.
 * @param endIndex The ending index (exclusive) of the sublist.
 * @return The sublist containing the elements from each tuple in the range [startIndex, endIndex).
 */
fun getSublist(tupleList: List<List<Any>>, startIndex: Int, endIndex: Int): List<List<Any>> {

    val sublist = mutableListOf<List<Any>>()
    var index = 0
    while (index < tupleList.size) {
        val subTuple = tupleList[index].subList(startIndex, endIndex)
        sublist.add(subTuple)
        index++
    }
    return sublist
}
/**
 * Given a list of tuples and start/end indices, returns a sublist containing the elements
 * from each tuple in the specified range.
 *
 * @param tupleList A list of tuples.
 * @param startIndex The starting index (inclusive) of the sublist.
 * @param endIndex The ending index (exclusive) of the sublist.
 * @return The sublist containing the elements from each tuple in the range [startIndex, endIndex).
 */
fun getSublist(tupleList: List<List<Any>>, startIndex: Int, endIndex: Int): List<List<Any>> {
/**
 * Given a list of tuples and start/end indices, returns a sublist containing the elements
 * from each tuple in the specified range.
 *
 * @param tupleList A list of tuples.
 * @param startIndex The starting index (inclusive) of the sublist.
 * @param endIndex The ending index (exclusive) of the sublist.
 * @return The sublist containing the elements from each tuple in the range [startIndex, endIndex).
 */
fun getSublist(tupleList: List<List<Any>>, startIndex: Int, endIndex: Int): List<List<Any>> {

    val sublist = mutableListOf<List<Any>>()
    var index = 0
    while (index < tupleList.size) {
        val subTuple = tupleList[index].subList(startIndex, endIndex)
        sublist.add(subTuple)
        index++
    }
    return sublist
}