def print_arguments():
def decorator(function):<EOL><INDENT>def inner(*args, **kwargs):<EOL><INDENT>if args:<EOL><INDENT>print("<STR_LIT>")<EOL>for i in args:<EOL><INDENT>pp.pprint(i)<EOL><DEDENT><DEDENT>print("<STR_LIT>")<EOL>pp.pprint(kwargs)<EOL>return function(*args, **kwargs)<EOL><DEDENT>return inner<EOL><DEDENT>return decorator<EOL>
Decorator that provides the wrapped function with an attribute 'print_arguments'
containing just those keyword arguments actually passed in to the function.

To use the decorator for debugging, preface the function into whose calls
you are interested with '@print_arguments()'