def _with_attrs(**kwargs):
def decorator(f):<EOL><INDENT>for k, v in kwargs.items():<EOL><INDENT>setattr(f, k, v)<EOL><DEDENT>return f<EOL><DEDENT>return decorator<EOL>
Decorator to set attributes on a function. Returns the original
    function after setting the attributes named by the keyword arguments.