def _get_arg(argname, args, kwargs):
try:<EOL><INDENT>return kwargs.pop(argname), args<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>return args[<NUM_LIT:0>], args[<NUM_LIT:1>:]<EOL><DEDENT>except IndexError:<EOL><INDENT>raise TypeError("<STR_LIT>" % argname)<EOL><DEDENT>
Get an argument, either from kwargs or from the first entry in args.
Raises a TypeError if argname not in kwargs and len(args) == 0.

Mutates kwargs in place if the value is found in kwargs.