code: def wait_for_deletion(self, interval=1):
          
          deleted = False
          while True:
              try:
                  if self.status != OnlineModel.Status.DELETING:
                      break
              except errors.NoSuchObject:
                  deleted = True
                  break
              time.sleep(interval)
  
          if not deleted:
              if self.status == OnlineModel.Status.DELETE_FAILED:
                  raise OnlineModelError(self.last_fail_msg, self)
              else:
                  raise OnlineModelError('Unexpected status occurs: %s' % self.status.value, self)
docs: Wait for the online model to be deleted.
  
          :param interval: check interval