/**
 * This function takes a dictionary and a condition as inputs. It filters the dictionary based on the condition provided,
 * and returns a new dictionary with only the key-value pairs that satisfy the condition.
 *
 * @param dictionary The dictionary to be filtered.
 * @param condition The condition that must be satisfied by the key-value pairs.
 * @return A new dictionary containing the filtered key-value pairs.
 */
fun filterDictionary(dictionary: Map<Any, Any>, condition: (Any, Any) -> Boolean): Map<Any, Any> {

    val filteredDict = mutableMapOf<Any, Any>()

    for ((key, value) in dictionary) {
        if (condition(key, value)) {
            filteredDict[key] = value
        }
    }

    return filteredDict
}
/**
 * This function takes a dictionary and a condition as inputs. It filters the dictionary based on the condition provided,
 * and returns a new dictionary with only the key-value pairs that satisfy the condition.
 *
 * @param dictionary The dictionary to be filtered.
 * @param condition The condition that must be satisfied by the key-value pairs.
 * @return A new dictionary containing the filtered key-value pairs.
 */
fun filterDictionary(dictionary: Map<Any, Any>, condition: (Any, Any) -> Boolean): Map<Any, Any> {
/**
 * This function takes a dictionary and a condition as inputs. It filters the dictionary based on the condition provided,
 * and returns a new dictionary with only the key-value pairs that satisfy the condition.
 *
 * @param dictionary The dictionary to be filtered.
 * @param condition The condition that must be satisfied by the key-value pairs.
 * @return A new dictionary containing the filtered key-value pairs.
 */
fun filterDictionary(dictionary: Map<Any, Any>, condition: (Any, Any) -> Boolean): Map<Any, Any> {

    val filteredDict = mutableMapOf<Any, Any>()

    for ((key, value) in dictionary) {
        if (condition(key, value)) {
            filteredDict[key] = value
        }
    }

    return filteredDict
}