def calculate_config_hash(config):
    """
    Calculate a hash for the given configuration.
    """
    hash_value = 0
    for key, value in config.items():
        hash_value += hash((key, value))
    return hash_value