def attr(**context):
<EOL>def decorator(func):<EOL><INDENT>def wrapped_func(*args, **kwargs):<EOL><INDENT>for key, value in list(context.items()):<EOL><INDENT>print(key, value)<EOL><DEDENT>return func(*args, **kwargs)<EOL><DEDENT>return wraps(func)(decorator)<EOL><DEDENT>return decorator<EOL>
Decorator that add attributes into func.

Added attributes can be access outside via function's `func_dict` property.