def METHOD_NAME(func: ValidationFunction) -> Validator:
    def _wrapper(*args: Any, **kwargs: Any) -> list[ValidationIssue]:
        extra = func(*args, **kwargs)
        if extra is None:
            return []
        issue: Issue
        name: str
        if isinstance(code_or_name, str):
            issue = issues.get_by_name("EXT")
            name = f"{issue.name}:{code_or_name}"
        elif isinstance(code_or_name, int):
            try:
                issue = issues.get_by_code(code_or_name)
                name = issue.name
            except KeyError:
                raise ValueError(f"unknown {validator_type} code {code_or_name}")
        else:
            issue = code_or_name
            name = issue.name
        code = issue.code
        text = issue.description
        return [ValidationIssue(code, name, text, extra)]
    wrapper = cast(Validator, _wrapper)
    wrapper.validator_type = validator_type
    return wrapper