/**
 * This function takes in two nested dictionaries and returns a list of keys that are present in both dictionaries.
 *
 * @param dict1 The first nested dictionary (dictionary with nested dictionaries as values)
 * @param dict2 The second nested dictionary
 * @return A list of keys that are present in both dictionaries
 */
fun intersectionCheck(dict1: Map<String, Map<String, Any>>, dict2: Map<String, Map<String, Any>>): List<String> {

    val result = mutableListOf<String>()

    // Loop through the keys of the first dictionary
    for (key1 in dict1.keys) {

        // Loop through the keys of the second dictionary
        for (key2 in dict2.keys) {

            // Check if the current key from the first dictionary exists in the second dictionary
            if (dict2[key2]?.containsKey(key1) == true) {

                // Append the key to the result list
                result.add(key1)
            }
        }
    }

    return result
}
/**
 * This function takes in two nested dictionaries and returns a list of keys that are present in both dictionaries.
 *
 * @param dict1 The first nested dictionary (dictionary with nested dictionaries as values)
 * @param dict2 The second nested dictionary
 * @return A list of keys that are present in both dictionaries
 */
fun intersectionCheck(dict1: Map<String, Map<String, Any>>, dict2: Map<String, Map<String, Any>>): List<String> {
/**
 * This function takes in two nested dictionaries and returns a list of keys that are present in both dictionaries.
 *
 * @param dict1 The first nested dictionary (dictionary with nested dictionaries as values)
 * @param dict2 The second nested dictionary
 * @return A list of keys that are present in both dictionaries
 */
fun intersectionCheck(dict1: Map<String, Map<String, Any>>, dict2: Map<String, Map<String, Any>>): List<String> {

    val result = mutableListOf<String>()

    // Loop through the keys of the first dictionary
    for (key1 in dict1.keys) {

        // Loop through the keys of the second dictionary
        for (key2 in dict2.keys) {

            // Check if the current key from the first dictionary exists in the second dictionary
            if (dict2[key2]?.containsKey(key1) == true) {

                // Append the key to the result list
                result.add(key1)
            }
        }
    }

    return result
}