code: def _wait_for_deployment_become_healthy(
      mlops_connection,
      deployment,
      max_wait_time_secs,
      model_name,
      environment,
  ):
      svc = mlops_connection.deployer.deployment_status
      status: h2o_mlops_client.DeployDeploymentStatus
      deadline = time.monotonic() + max_wait_time_secs
  
      while True:
          time.sleep(10)
          status = svc.get_deployment_status(
              h2o_mlops_client.DeployGetDeploymentStatusRequest(
                  deployment_id=deployment.id
              )
          ).deployment_status
          if (
              status.state
              == h2o_mlops_client.DeployDeploymentState.HEALTHY
              or time.monotonic() > deadline
          ):
              break
      if status.state == h2o_mlops_client.DeployDeploymentState.HEALTHY:
          return {
              "model_name": model_name,
              "environment": environment,
              "score_url": status.scorer.score.url,
              "sample_request_url": status.scorer.sample_request.url,
              "schema_url": status.scorer.score.url[0:-5] + "schema",
          }
      else:
          None
  
imports: import h2o_cloud_extensions
  import h2o_mlops_client
  import time
  import h2o
  from .status import _is_model_deployed, _is_model_published
  from .connect import *
  from .utils import *
label_desc: Use image node_id 8 for calling a global function with example usage: _wait_for_deployment_become_healthy(mlops_connection, deployment, max_wait_time_secs, model_name, environment) and returns: dict