Separate helper to generate "get_default()" function.