/**
 * Function to find the intersection of two sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set containing the common elements found in both sets.
 */
fun intersectSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (item in set1) {
        if (item in set2) {
            intersectionSet.add(item)
        }
    }
    return intersectionSet
}
/**
 * Function to find the intersection of two sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set containing the common elements found in both sets.
 */
fun intersectSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * Function to find the intersection of two sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set containing the common elements found in both sets.
 */
fun intersectSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (item in set1) {
        if (item in set2) {
            intersectionSet.add(item)
        }
    }
    return intersectionSet
}