/**
 * This function takes two lists of nested tuples and returns a set of tuples that are common to both lists.
 *
 * @param data1 A list of nested tuples.
 * @param data2 Another list of nested tuples.
 * @return A set of tuples that are common to both data1 and data2.
 */
fun nestedTuplesIntersection(data1: List<List<Any>>, data2: List<List<Any>>): Set<List<Any>> {

    // Create a set to store common tuples
    val commonTuples = data1.flatMap { tuple1 -> data2.filter { tuple2 -> tuple1 == tuple2 } }.toSet()
    
    return commonTuples
}
/**
 * This function takes two lists of nested tuples and returns a set of tuples that are common to both lists.
 *
 * @param data1 A list of nested tuples.
 * @param data2 Another list of nested tuples.
 * @return A set of tuples that are common to both data1 and data2.
 */
fun nestedTuplesIntersection(data1: List<List<Any>>, data2: List<List<Any>>): Set<List<Any>> {
/**
 * This function takes two lists of nested tuples and returns a set of tuples that are common to both lists.
 *
 * @param data1 A list of nested tuples.
 * @param data2 Another list of nested tuples.
 * @return A set of tuples that are common to both data1 and data2.
 */
fun nestedTuplesIntersection(data1: List<List<Any>>, data2: List<List<Any>>): Set<List<Any>> {

    // Create a set to store common tuples
    val commonTuples = data1.flatMap { tuple1 -> data2.filter { tuple2 -> tuple1 == tuple2 } }.toSet()
    
    return commonTuples
}