/**
 * This function copies a sublist from a given list, starting from the start index (inclusive)
 * and ending at the end index (exclusive).
 *
 * @param items The original list
 * @param startIndex The index to start the sublist
 * @param endIndex The index to end the sublist
 * @return A new list containing the copied sublist
 */
fun copySublist(items: List<Any>, startIndex: Int, endIndex: Int): List<Any> {

    val sublist = items.subList(startIndex, endIndex)
    val copiedSublist = ArrayList(sublist)
    return copiedSublist
}
/**
 * This function copies a sublist from a given list, starting from the start index (inclusive)
 * and ending at the end index (exclusive).
 *
 * @param items The original list
 * @param startIndex The index to start the sublist
 * @param endIndex The index to end the sublist
 * @return A new list containing the copied sublist
 */
fun copySublist(items: List<Any>, startIndex: Int, endIndex: Int): List<Any> {
/**
 * This function copies a sublist from a given list, starting from the start index (inclusive)
 * and ending at the end index (exclusive).
 *
 * @param items The original list
 * @param startIndex The index to start the sublist
 * @param endIndex The index to end the sublist
 * @return A new list containing the copied sublist
 */
fun copySublist(items: List<Any>, startIndex: Int, endIndex: Int): List<Any> {

    val sublist = items.subList(startIndex, endIndex)
    val copiedSublist = ArrayList(sublist)
    return copiedSublist
}