/**
 * This function takes two tuples as input and returns a new tuple that contains elements which are common
 * to both input tuples.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A new tuple containing common elements from both input tuples.
 */
fun tupleIntersection(tuple1: List<Any>, tuple2: List<Any>): List<Any> {

    // Find the intersection of the two tuples
    val intersect = (tuple1.toSet() intersect tuple2.toSet()).toList()
    return intersect
}
/**
 * This function takes two tuples as input and returns a new tuple that contains elements which are common
 * to both input tuples.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A new tuple containing common elements from both input tuples.
 */
fun tupleIntersection(tuple1: List<Any>, tuple2: List<Any>): List<Any> {
/**
 * This function takes two tuples as input and returns a new tuple that contains elements which are common
 * to both input tuples.
 *
 * @param tuple1 The first tuple.
 * @param tuple2 The second tuple.
 * @return A new tuple containing common elements from both input tuples.
 */
fun tupleIntersection(tuple1: List<Any>, tuple2: List<Any>): List<Any> {

    // Find the intersection of the two tuples
    val intersect = (tuple1.toSet() intersect tuple2.toSet()).toList()
    return intersect
}