def with_formatter(formatter):
def _decorator_after_args(unwrapped):<EOL><INDENT>def _wrapped(self, *args, **kwargs):<EOL><INDENT>logging.debug('<STR_LIT>', unwrapped)<EOL>logging.debug('<STR_LIT>', self)<EOL>logging.debug('<STR_LIT>', args)<EOL>logging.debug('<STR_LIT>', kwargs)<EOL>return_value = unwrapped(self, *args, **kwargs)<EOL>if '<STR_LIT>' in kwargs and kwargs['<STR_LIT>']:<EOL><INDENT>return return_value<EOL><DEDENT>else:<EOL><INDENT>return formatter(return_value)<EOL><DEDENT><DEDENT>return _wrapped<EOL><DEDENT>return _decorator_after_args<EOL>
Apply a formatter function the return value
    of the decorated function.