def validate_config(config):
    """Determines whether config appears to be a valid layer config."""
    return (
        isinstance(config, dict) and _LAYER_UNDEFINED_CONFIG_KEY not in config
    )
Determines whether config appears to be a valid layer config.
keras/src/legacy/saving/serialization.py