def METHOD_NAME(self, named, spec):
    defined = set(named) | set(spec.defaults)
    missing = [arg for arg in spec.named_only if arg not in defined]
    if missing:
        self._raise_error("missing named-only argument%s %s"
                          % (plural_or_not(missing), seq2str(sorted(missing))))