/**
 * Given a tuple and an index, return the value at the specified index in the tuple.
 *
 * @param t The tuple to access the element from.
 * @param index The index of the element to be accessed.
 * @return The value at the specified index in the tuple.
 * @throws IndexOutOfBoundsException If the index is out of range for the provided tuple.
 */
fun accessTupleElement(t: List<Any>, index: Int): Any {

    return try {
        t[index]  // Access the element at the given index
    } catch (e: IndexOutOfBoundsException) {
        throw IndexOutOfBoundsException("Index is out of range for the provided tuple.")
    }
}
/**
 * Given a tuple and an index, return the value at the specified index in the tuple.
 *
 * @param t The tuple to access the element from.
 * @param index The index of the element to be accessed.
 * @return The value at the specified index in the tuple.
 * @throws IndexOutOfBoundsException If the index is out of range for the provided tuple.
 */
fun accessTupleElement(t: List<Any>, index: Int): Any {
/**
 * Given a tuple and an index, return the value at the specified index in the tuple.
 *
 * @param t The tuple to access the element from.
 * @param index The index of the element to be accessed.
 * @return The value at the specified index in the tuple.
 * @throws IndexOutOfBoundsException If the index is out of range for the provided tuple.
 */
fun accessTupleElement(t: List<Any>, index: Int): Any {

    return try {
        t[index]  // Access the element at the given index
    } catch (e: IndexOutOfBoundsException) {
        throw IndexOutOfBoundsException("Index is out of range for the provided tuple.")
    }
}