code: def _wait_web_ready(self):
      loop = new_isolation().loop
  
      async def get_supervisors():
          start_time = time.time()
          while True:
              try:
                  cluster_api = WebClusterAPI(
                      self._external_web_endpoint
                  )
                  supervisors = await cluster_api.get_supervisors()
  
                  if len(supervisors) == self._supervisor_num:
                      break
              except:  # noqa: E722  # nosec  # pylint: disable=bare-except  # pragma: no cover
                  if (
                      self._timeout is not None
                      and time.time() - start_time > self._timeout
                  ):
                      logger.exception(
                          "Error when fetching supervisors"
                      )
                      raise TimeoutError(
                          "Wait for kubernetes cluster timed out"
                      ) from None
  
      asyncio.run_coroutine_threadsafe(get_supervisors(), loop).result()
  
imports: import asyncio
  import functools
  import logging
  import random
  import time
  import uuid
  from urllib.parse import urlparse
  from ...lib.aio import new_isolation, stop_isolation
  from ...services.cluster.api import WebClusterAPI
  from ...session import new_session
  from ...utils import calc_size_by_str
  from ..utils import wait_services_ready
  from .config import NamespaceConfig, RoleConfig, RoleBindingConfig, ServiceConfig, MarsSupervisorsConfig, MarsWorkersConfig
label_desc: Use image node_id 13 for calling the KubernetesCluster obj's underlying member method code with example usage: obj._wait_web_ready() without return types