docs: def patched(attrs, updates):
      """A context in which some attributes temporarily have a modified value."""
      orig = patch(attrs, updates.items())
      try:
          yield orig
      finally:
          patch(attrs, orig.items())