def add_argument(self, *args, **kwargs):
<EOL>chars = self.prefix_chars<EOL>if not args or len(args) == <NUM_LIT:1> and args[<NUM_LIT:0>][<NUM_LIT:0>] not in chars:<EOL><INDENT>if args and '<STR_LIT>' in kwargs:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>kwargs = self._get_positional_kwargs(*args, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>kwargs = self._get_optional_kwargs(*args, **kwargs)<EOL><DEDENT>if '<STR_LIT:default>' not in kwargs:<EOL><INDENT>dest = kwargs['<STR_LIT>']<EOL>if dest in self._defaults:<EOL><INDENT>kwargs['<STR_LIT:default>'] = self._defaults[dest]<EOL><DEDENT>elif self.argument_default is not None:<EOL><INDENT>kwargs['<STR_LIT:default>'] = self.argument_default<EOL><DEDENT><DEDENT>action_class = self._pop_action_class(kwargs)<EOL>if not _callable(action_class):<EOL><INDENT>raise ValueError('<STR_LIT>' % (action_class,))<EOL><DEDENT>action = action_class(**kwargs)<EOL>type_func = self._registry_get('<STR_LIT:type>', action.type, action.type)<EOL>if not _callable(type_func):<EOL><INDENT>raise ValueError('<STR_LIT>' % (type_func,))<EOL><DEDENT>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>try:<EOL><INDENT>self._get_formatter()._format_args(action, None)<EOL><DEDENT>except TypeError:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>return self._add_action(action)<EOL>
add_argument(dest, ..., name=value, ...)
add_argument(option_string, option_string, ..., name=value, ...)