def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def lock_temp(self, key):
    self.lock(key)
    try:
      yield
    finally:
      self.unlock(key)