code: def new_cluster(
      kube_api_client=None,
      image=None,
      supervisor_num=1,
      supervisor_cpu=None,
      supervisor_mem=None,
      worker_num=1,
      worker_cpu=None,
      worker_mem=None,
      worker_spill_paths=None,
      worker_cache_mem=None,
      min_worker_num=None,
      web_num=1,
      web_cpu=None,
      web_mem=None,
      service_type=None,
      timeout=None,
      **kwargs,
  ):
      """
      :param kube_api_client: Kubernetes API client, can be created with ``new_client_from_config``
      :param image: Docker image to use, ``marsproject/mars:<mars version>`` by default
      :param supervisor_num: Number of supervisors in the cluster, 1 by default
      :param supervisor_cpu: Number of CPUs for every supervisor
      :param supervisor_mem: Memory size for every supervisor
      :param worker_num: Number of workers in the cluster, 1 by default
      :param worker_cpu: Number of CPUs for every worker
      :param worker_mem: Memory size for every worker
      :param worker_spill_paths: Spill paths for worker pods on hosts
      :param worker_cache_mem: Size or ratio of cache memory for every worker
      :param min_worker_num: Minimal ready workers
      :param web_num: Number of web services in the cluster, 1 by default
      :param web_cpu: Number of CPUs for every web service
      :param web_mem: Memory size for every web service
      :param service_type: Type of Kubernetes Service, currently only ``NodePort`` supported
      :param timeout: Timeout when creating clusters
      """
      cluster_cls = kwargs.pop("cluster_cls", KubernetesCluster)
      cluster = cluster_cls(
          kube_api_client,
          image=image,
          supervisor_num=supervisor_num,
          supervisor_cpu=supervisor_cpu,
          supervisor_mem=supervisor_mem,
          worker_num=worker_num,
          worker_cpu=worker_cpu,
          worker_mem=worker_mem,
          worker_spill_paths=worker_spill_paths,
          worker_cache_mem=worker_cache_mem,
          min_worker_num=min_worker_num,
          web_num=web_num,
          web_cpu=web_cpu,
          web_mem=web_mem,
          service_type=service_type,
          timeout=timeout,
          **kwargs,
      )
      client = KubernetesClusterClient(cluster)
      client.start()
      return client
  
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 1 for calling a global function with example usage: new_cluster(kube_api_client, image, supervisor_num, supervisor_cpu, supervisor_mem, worker_num, worker_cpu, worker_mem, worker_spill_paths, worker_cache_mem, min_worker_num, web_num, web_cpu, web_mem, service_type, timeout) and returns: client