code: def wait_for_service(self, interval=1):
          
          while self.status in (OnlineModel.Status.DEPLOYING, OnlineModel.Status.UPDATING):
              time.sleep(interval)
          if self.status == OnlineModel.Status.DEPLOY_FAILED:
              raise OnlineModelError(self.last_fail_msg, self)
          elif self.status != OnlineModel.Status.SERVING:
              raise OnlineModelError('Unexpected status occurs: %s' % self.status.value, self)
docs: Wait for the online model to be ready for service.
  
          :param interval: check interval