def METHOD_NAME(config, schema, node):
    for key in config.keys():
        if key not in PERMITTED_KEYS[node]:
            raise KeyError(f"Unknown/forbidden {node} config key: '{key}'")
    validated_config = schema(config)
    return {key: validated_config[key] for key in config.keys()}