/**
 * Returns the intersection of two sets using the division assignment operator ('/=').
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The intersection of set1 and set2.
 */
fun intersectionOfSetsDivisionAssignmentOperator(set1: MutableSet<*>, set2: MutableSet<*>): MutableSet<*> {

    // Perform the intersection using the division assignment operator
    try {
        set1.retainAll(set2)
        return set1
    } catch (e: TypeCastException) {
        throw Exception("Invalid input! The sets must be mutable.")
    }
}
/**
 * Returns the intersection of two sets using the division assignment operator ('/=').
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The intersection of set1 and set2.
 */
fun intersectionOfSetsDivisionAssignmentOperator(set1: MutableSet<*>, set2: MutableSet<*>): MutableSet<*> {
/**
 * Returns the intersection of two sets using the division assignment operator ('/=').
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The intersection of set1 and set2.
 */
fun intersectionOfSetsDivisionAssignmentOperator(set1: MutableSet<*>, set2: MutableSet<*>): MutableSet<*> {

    // Perform the intersection using the division assignment operator
    try {
        set1.retainAll(set2)
        return set1
    } catch (e: TypeCastException) {
        throw Exception("Invalid input! The sets must be mutable.")
    }
}