async def corofunc():
            nonlocal called
            called = True
            return "some arbitrary value"
def lock_temp(self, key):
    self.lock(key)
    try:
      yield
    finally:
      self.unlock(key)