/**
 * This function takes two sets as input and removes the intersection of the two sets from set1.
 * The result is returned as a Pair containing the updated set1 and the elements that were removed.
 */
fun removeElementsFromSet(set1: MutableSet<Any>, set2: Set<Any>): Pair<MutableSet<Any>, Set<Any>> {

    // Find the intersection of the two sets
    val intersection = set1.intersect(set2)

    // Remove the intersection elements from set1
    set1.removeAll(intersection)

    // Return the updated set1 and the removed elements as a Pair
    return Pair(set1, intersection)
}
/**
 * This function takes two sets as input and removes the intersection of the two sets from set1.
 * The result is returned as a Pair containing the updated set1 and the elements that were removed.
 */
fun removeElementsFromSet(set1: MutableSet<Any>, set2: Set<Any>): Pair<MutableSet<Any>, Set<Any>> {
/**
 * This function takes two sets as input and removes the intersection of the two sets from set1.
 * The result is returned as a Pair containing the updated set1 and the elements that were removed.
 */
fun removeElementsFromSet(set1: MutableSet<Any>, set2: Set<Any>): Pair<MutableSet<Any>, Set<Any>> {

    // Find the intersection of the two sets
    val intersection = set1.intersect(set2)

    // Remove the intersection elements from set1
    set1.removeAll(intersection)

    // Return the updated set1 and the removed elements as a Pair
    return Pair(set1, intersection)
}