code: def get_stream_pool(device_idx):
      """Get the CUDA stream pool of a GPU device."""
      # In case there will be multiple threads writing to the pool.
      lock = threading.Lock()
      lock.acquire()
      if not _device_stream_pool_map:
          _init_stream_pool()
      lock.release()
      return _device_stream_pool_map[device_idx]
  
file_path: ray/python/ray/util/collective/collective_group/cuda_stream.py
imports: import logging
  import threading
  import cupy
  from ray.util.collective.collective_group import nccl_util
  from ray.util.collective.const import ENV
label_desc: Use image node_id 2 for calling a global function with example usage: get_stream_pool(device_idx) and returns: _device_stream_pool_map