/**
 * You have been given a nested dictionary 'nestedDict' and a list of keys 'keys'. Your task is to modify the
 * values of the inner-most dictionaries based on the given keys.
 *
 * @param nestedDict The nested dictionary to be modified.
 * @param keys The list of keys to be used for modification.
 * @return The modified nested dictionary.
 */
fun modifyDictionaryItems(nestedDict: MutableMap<String, MutableMap<String, Int>>, keys: List<String>): MutableMap<String, MutableMap<String, Int>> {

    // Iterate over the items of the nested dictionary
    for ((key1, innerDict) in nestedDict) {
        // Iterate over the inner dictionary items
        for ((key2, value) in innerDict) {
            // Check if the key exists in the 'keys' list
            if (key2 in keys) {
                // Modify the value based on some conditions
                if (value > 50) {
                    nestedDict[key1]?.set(key2, value * 2)
                } else {
                    nestedDict[key1]?.set(key2, value + 10)
                }
            }
        }
    }
    return nestedDict
}
/**
 * You have been given a nested dictionary 'nestedDict' and a list of keys 'keys'. Your task is to modify the
 * values of the inner-most dictionaries based on the given keys.
 *
 * @param nestedDict The nested dictionary to be modified.
 * @param keys The list of keys to be used for modification.
 * @return The modified nested dictionary.
 */
fun modifyDictionaryItems(nestedDict: MutableMap<String, MutableMap<String, Int>>, keys: List<String>): MutableMap<String, MutableMap<String, Int>> {
/**
 * You have been given a nested dictionary 'nestedDict' and a list of keys 'keys'. Your task is to modify the
 * values of the inner-most dictionaries based on the given keys.
 *
 * @param nestedDict The nested dictionary to be modified.
 * @param keys The list of keys to be used for modification.
 * @return The modified nested dictionary.
 */
fun modifyDictionaryItems(nestedDict: MutableMap<String, MutableMap<String, Int>>, keys: List<String>): MutableMap<String, MutableMap<String, Int>> {

    // Iterate over the items of the nested dictionary
    for ((key1, innerDict) in nestedDict) {
        // Iterate over the inner dictionary items
        for ((key2, value) in innerDict) {
            // Check if the key exists in the 'keys' list
            if (key2 in keys) {
                // Modify the value based on some conditions
                if (value > 50) {
                    nestedDict[key1]?.set(key2, value * 2)
                } else {
                    nestedDict[key1]?.set(key2, value + 10)
                }
            }
        }
    }
    return nestedDict
}