def store_args(method):
argspec = inspect.getfullargspec(method)<EOL>defaults = {}<EOL>if argspec.defaults is not None:<EOL><INDENT>defaults = dict(<EOL>zip(argspec.args[-len(argspec.defaults):], argspec.defaults))<EOL><DEDENT>if argspec.kwonlydefaults is not None:<EOL><INDENT>defaults.update(argspec.kwonlydefaults)<EOL><DEDENT>arg_names = argspec.args[<NUM_LIT:1>:]<EOL>@functools.wraps(method)<EOL>def wrapper(*positional_args, **keyword_args):<EOL><INDENT>self = positional_args[<NUM_LIT:0>]<EOL>args = defaults.copy()<EOL>for name, value in zip(arg_names, positional_args[<NUM_LIT:1>:]):<EOL><INDENT>args[name] = value<EOL><DEDENT>args.update(keyword_args)<EOL>self.__dict__.update(args)<EOL>return method(*positional_args, **keyword_args)<EOL><DEDENT>return wrapper<EOL>
Stores provided method args as instance attributes.