def get_ext_args(**kwargs):
default = kwargs.get("<STR_LIT:default>")<EOL>getter = kwargs.get("<STR_LIT>")<EOL>setter = kwargs.get("<STR_LIT>")<EOL>method = kwargs.get("<STR_LIT>")<EOL>if getter is None and setter is not None:<EOL><INDENT>raise ValueError(Errors.E089)<EOL><DEDENT>valid_opts = ("<STR_LIT:default>" in kwargs, method is not None, getter is not None)<EOL>nr_defined = sum(t is True for t in valid_opts)<EOL>if nr_defined != <NUM_LIT:1>:<EOL><INDENT>raise ValueError(Errors.E083.format(nr_defined=nr_defined))<EOL><DEDENT>if setter is not None and not hasattr(setter, "<STR_LIT>"):<EOL><INDENT>raise ValueError(Errors.E091.format(name="<STR_LIT>", value=repr(setter)))<EOL><DEDENT>if getter is not None and not hasattr(getter, "<STR_LIT>"):<EOL><INDENT>raise ValueError(Errors.E091.format(name="<STR_LIT>", value=repr(getter)))<EOL><DEDENT>if method is not None and not hasattr(method, "<STR_LIT>"):<EOL><INDENT>raise ValueError(Errors.E091.format(name="<STR_LIT>", value=repr(method)))<EOL><DEDENT>return (default, method, getter, setter)<EOL>
Validate and convert arguments. Reused in Doc, Token and Span.