code: def _get_cuda_devices(cuda_devices, n_worker):
      if cuda_devices == "auto":
          total = cuda_count()
          all_devices = np.arange(total)
          return [
              list(arr) for arr in np.array_split(all_devices, n_worker)
          ]
  
      else:  # pragma: no cover
          if isinstance(cuda_devices[0], int):
              assert n_worker == 1
              return [cuda_devices]
          else:
              assert len(cuda_devices) == n_worker
              return cuda_devices
  
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 2 for calling the LocalCluster obj's underlying member method code with example usage: obj._get_cuda_devices(cuda_devices, n_worker) and returns: unknown, list, cuda_devices