code: def _wait_until_done(self, response, wait=30):
          
  
          gce = self._connect()
  
          status = response['status']
          while status != 'DONE' and response:
              # wait a random amount of time (up to `wait` seconds)
              if wait:
                  time.sleep(1 + random.randrange(wait))
  
              operation_id = response['name']
  
              # Identify if this is a per-zone resource
              if 'zone' in response:
                  zone_name = response['zone'].split('/')[-1]
                  request = gce.zoneOperations().get(
                      project=self._project_id, operation=operation_id,
                      zone=zone_name)
              else:
                  request = gce.globalOperations().get(
                      project=self._project_id,
                      operation=operation_id)
  
              response = self._execute_request(request)
              if response:
                  status = response['status']
          return response
docs: Blocks until the operation status is done for the given operation.
  
          :param response: The response object used in a previous GCE call.
  
          :param int wait: Wait up to this number of seconds in between
                           successive polling of the GCE status.