@contextmanager<EOL>def patched(attrs, updates):
orig = patch(attrs, updates.items())<EOL>try:<EOL><INDENT>yield orig<EOL><DEDENT>finally:<EOL><INDENT>patch(attrs, orig.items())<EOL><DEDENT>
A context in which some attributes temporarily have a modified value.