validate_warn_level
validate_warn_level(
behavior ,
name: str = behavior,
)-> ‘WARN_LEVELS’
Ensure a warn-level argument is one of the supported values.
Called where the argument arrives rather than where it is acted on: only an incompatible patch reaches warn_or_raise, so validating there would accept a retired spelling until the data made it matter. name is the parameter the caller spells it as, so the refusal names the argument the user actually passed.