code: def wait(self, timeout=0):
          
          start_time = time.time()
  
          # We return synchronously, so we block in a busy loop waiting for the
          # request to be done.
          while not self.is_done:
              duration = time.time() - start_time
              if timeout and duration > timeout:
                  raise CloudTimeoutError(
                      "Timeout getting async value. Timeout: %d seconds" % timeout
                  )
              time.sleep(0.1)
  
          # If we get an any status code other than a 2xx we raise an exception to the user, which can then be handled
          # accordingly.
          status_code, error_msg, payload = self.check_error()
          if not self._status_ok(status_code):
              raise CloudAsyncError("Async response for '%s' returned an error." % self.async_id,
                                    reason=error_msg,
                                    status=status_code)
  
          value = self.value
          if isinstance(value, six.binary_type):
              value = value.decode('utf-8')
          return value
docs: Blocks until timeout (seconds) or forever
  
          :param timeout: time to wait, in seconds
          :return: