code: def __init__(
      self: ClusterType,
      address: str = "0.0.0.0",
      n_worker: int = 1,
      n_cpu: Union[int, str] = "auto",
      mem_bytes: Union[int, str] = "auto",
      cuda_devices: Union[List[int], List[List[int]], str] = "auto",
      subprocess_start_method: str = None,
      backend: str = None,
      config: Union[str, Dict] = None,
      web: Union[bool, str] = "auto",
      n_supervisor_process: int = 0,
  ):
      # load third party extensions.
      init_extension_entrypoints()
      # auto choose the subprocess_start_method.
      if subprocess_start_method is None:
          subprocess_start_method = (
              "spawn" if sys.platform == "win32" else "forkserver"
          )
      self._address = address
      self._n_worker = n_worker
      self._n_cpu = cpu_count() if n_cpu == "auto" else n_cpu
      self._mem_bytes = (
          mem_total() if mem_bytes == "auto" else mem_bytes
      )
      self._cuda_devices = self._get_cuda_devices(
          cuda_devices, n_worker
      )
      self._subprocess_start_method = subprocess_start_method
      self._config = load_config(
          config, default_config_file=DEFAULT_CONFIG_FILE
      )
      execution_config = ExecutionConfig.from_config(
          self._config, backend=backend
      )
      self._backend = execution_config.backend
      self._web = web
      self._n_supervisor_process = n_supervisor_process
  
      execution_config.merge_from(
          ExecutionConfig.from_params(
              backend=self._backend,
              n_worker=self._n_worker,
              n_cpu=self._n_cpu,
              mem_bytes=self._mem_bytes,
              cuda_devices=self._cuda_devices,
              subtask_cancel_timeout=self._config.get(
                  "scheduling", {}
              ).get(
                  "subtask_cancel_timeout",
                  DEFAULT_SUBTASK_CANCEL_TIMEOUT,
              ),
              subtask_max_retries=self._config.get(
                  "scheduling", {}
              ).get("subtask_max_retries", DEFAULT_SUBTASK_MAX_RETRIES),
          )
      )
  
      self._bands_to_resource = (
          execution_config.get_deploy_band_resources()
      )
      self._supervisor_pool = None
      self._worker_pools = []
      self._exiting_check_task = None
  
      self.supervisor_address = None
      self.web_address = None
  
imports: import asyncio
  import atexit
  import os
  import sys
  import logging
  from concurrent.futures import Future
  from typing import Dict, List, Union
  import numpy
  from ...None import oscar
  from ...core.entrypoints import init_extension_entrypoints
  from ...lib.aio import get_isolation
  from ...metrics import init_metrics
  from ...oscar.backends.router import Router
  from ...resource import cpu_count, cuda_count, mem_total
  from ...services import NodeRole
  from ...services.task.execution.api import ExecutionConfig
  from ...session import AbstractSession, _new_session, ensure_isolation_created
  from ...typing import ClusterType, ClientType
  from ..utils import get_third_party_modules_from_config, load_config
  from .pool import create_supervisor_actor_pool, create_worker_actor_pool
  from .service import start_supervisor, start_worker, stop_supervisor, stop_worker
label_desc: Use image node_id 1 to create a new LocalCluster object  with example: obj = LocalCluster(address, n_worker, n_cpu, mem_bytes, cuda_devices, subprocess_start_method, backend, config, web, n_supervisor_process)