code: def wait_until_server_ready(
      host: str,
      port: int,
      timeout: float = 30,
      check_interval: int = 1,
      # set kwargs here to omit gRPC kwargs
      **kwargs: t.Any,
  ) -> None:
      protocol_version = kwargs.get(
          "protocol_version", LATEST_PROTOCOL_VERSION
      )
  
      with GrpcClient._create_channel(
          f"{host}:{port}",
          ssl=kwargs.get("ssl", False),
          ssl_client_credentials=kwargs.get(
              "ssl_client_credentials", None
          ),
          channel_options=kwargs.get("channel_options", None),
          compression=kwargs.get("compression", None),
      ) as channel:
          rpc = channel.unary_unary(
              "/grpc.health.v1.Health/Check",
              request_serializer=pb_health.HealthCheckRequest.SerializeToString,
              response_deserializer=pb_health.HealthCheckResponse.FromString,
          )
  
          start_time = time.time()
          while time.time() - start_time < timeout:
              try:
                  response = t.cast(
                      pb_health.HealthCheckResponse,
                      rpc(
                          pb_health.HealthCheckRequest(
                              service=f"bentoml.grpc.{protocol_version}.BentoService"
                          )
                      ),
                  )
                  if (
                      response.status
                      == pb_health.HealthCheckResponse.SERVING
                  ):
                      break
                  else:
                      time.sleep(check_interval)
              except grpc.RpcError:
                  logger.debug("Server is not ready. Retrying...")
                  time.sleep(check_interval)
  
          try:
              response = t.cast(
                  pb_health.HealthCheckResponse,
                  rpc(
                      pb_health.HealthCheckRequest(
                          service=f"bentoml.grpc.{protocol_version}.BentoService"
                      )
                  ),
              )
              if (
                  response.status
                  != pb_health.HealthCheckResponse.SERVING
              ):
                  raise TimeoutError(
                      f"Timed out waiting {timeout} seconds for server at '{host}:{port}' to be ready."
                  )
          except (grpc.RpcError, TimeoutError) as err:
              logger.error(
                  "Caught exception while connecting to %s:%s:",
                  host,
                  port,
              )
              logger.error(err)
              raise
  
imports: from __future__ import annotations
  import asyncio
  import logging
  import time
  import typing
  from functools import cached_property
  from typing import TYPE_CHECKING
  from packaging.version import parse
  from ...exceptions import BentoMLException
  from ...grpc.utils import LATEST_PROTOCOL_VERSION
  from ...grpc.utils import import_generated_stubs
  from ...grpc.utils import import_grpc
  from ...grpc.utils import load_from_file
  from ..None import io_descriptors
  from ..service import Service
  from ..service.inference_api import InferenceAPI
  from ..utils import LazyLoader
  from .None import AsyncClient
  from .None import Client
  from .None import SyncClient
label_desc: Use image node_id 4 for calling the SyncGrpcClient obj's underlying member method code with example usage: obj.wait_until_server_ready(host, port, timeout, check_interval) without return types