code: def __init__(
      self,
      cluster_name: str,
      supervisor_cpu: Union[int, float] = 1,
      supervisor_mem: int = 1 * 1024**3,
      worker_num: int = 1,
      worker_cpu: Union[int, float] = 2,
      worker_mem: int = 2 * 1024**3,
      backend: str = None,
      config: Union[str, Dict] = None,
      n_supervisor_process: int = DEFAULT_SUPERVISOR_SUB_POOL_NUM,
  ):
      # load third party extensions.
      init_extension_entrypoints()
      self._cluster_name = cluster_name
      self._supervisor_cpu = supervisor_cpu
      self._supervisor_mem = supervisor_mem
      self._n_supervisor_process = n_supervisor_process
      self._worker_num = worker_num
      self._worker_cpu = worker_cpu
      self._worker_mem = worker_mem
      self.backend = backend
      # load config file to dict.
      self._config = load_config(
          config, default_config_file=DEFAULT_CONFIG_FILE
      )
      self.supervisor_address = None
      # Hold actor handles to avoid being freed
      self._supervisor_pool = None
      self._worker_addresses = []
      self._worker_pools = []
      self._stopped = False
      self._cluster_backend = None
      self.web_address = None
  
imports: import asyncio
  import itertools
  import logging
  import os
  import time
  from typing import Union, Dict, List, Optional, AsyncGenerator
  from ...None import oscar
  from ...core.entrypoints import init_extension_entrypoints
  from ...metrics import init_metrics
  from ...oscar.backends.ray.driver import RayActorDriver
  from ...oscar.backends.ray.utils import process_placement_to_address, node_placement_to_address, process_address_to_placement
  from ...oscar.backends.ray.pool import RayPoolState
  from ...oscar.backends.router import Router
  from ...oscar.errors import ReconstructWorkerError
  from ...resource import Resource
  from ...services.cluster.backends.base import register_cluster_backend, AbstractClusterBackend
  from ...services import NodeRole
  from ...services.task.execution.api import ExecutionConfig
  from ...session import _new_session, new_session, AbstractSession, ensure_isolation_created
  from ...utils import lazy_import, retry_callable
  from ..utils import load_config, get_third_party_modules_from_config
  from .service import start_supervisor, start_worker, stop_supervisor, stop_worker
  from .pool import create_supervisor_actor_pool, create_worker_actor_pool
label_desc: Use image node_id 1 to create a new RayCluster object  with example: obj = RayCluster(cluster_name, supervisor_cpu, supervisor_mem, worker_num, worker_cpu, worker_mem, backend, config, n_supervisor_process)