@contextmanager
  def TempAttr(self, name, value):
    old_value = getattr(self, name)
    setattr(self, name, value)
    yield
    setattr(self, name, old_value)
Construct a context manager that temporarily sets an attribute value.
dataset/ETHPy150Open google/rfmt/formatter/default_format_policy.py/DefaultFormatPolicy.TempAttr