/**
 * Calculates the intersection of two dictionaries and returns it as a new dictionary.
 *
 * @param dictionary1 First dictionary to find the intersection of.
 * @param dictionary2 Second dictionary to find the intersection of.
 * @return A new dictionary containing the common key-value pairs from both dictionaries.
 */
fun getDictIntersection(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): Map<String, Any> {

    val intersectionDict = mutableMapOf<String, Any>()

    for ((key, value) in dictionary1) {
        if (dictionary2.containsKey(key) && dictionary2[key] == value) {
            intersectionDict[key] = value
        }
    }

    return intersectionDict
}
/**
 * Calculates the intersection of two dictionaries and returns it as a new dictionary.
 *
 * @param dictionary1 First dictionary to find the intersection of.
 * @param dictionary2 Second dictionary to find the intersection of.
 * @return A new dictionary containing the common key-value pairs from both dictionaries.
 */
fun getDictIntersection(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): Map<String, Any> {
/**
 * Calculates the intersection of two dictionaries and returns it as a new dictionary.
 *
 * @param dictionary1 First dictionary to find the intersection of.
 * @param dictionary2 Second dictionary to find the intersection of.
 * @return A new dictionary containing the common key-value pairs from both dictionaries.
 */
fun getDictIntersection(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): Map<String, Any> {

    val intersectionDict = mutableMapOf<String, Any>()

    for ((key, value) in dictionary1) {
        if (dictionary2.containsKey(key) && dictionary2[key] == value) {
            intersectionDict[key] = value
        }
    }

    return intersectionDict
}