class_docstr: ThreadedRayInstaller is responsible for install ray on new nodes.
class_docstr_tok: ["ThreadedRayInstaller","is","responsible","for","install","ray","on","new","nodes","."]
code: def __init__(
      self,
      head_node_ip: str,
      instance_storage: InstanceStorage,
      ray_installer: RayInstaller,
      max_install_attempts: int = 3,
      install_retry_interval: int = 10,
      max_concurrent_installs: int = 50,
  ) -> None:
      self._head_node_ip = head_node_ip
      self._instance_storage = instance_storage
      self._ray_installer = ray_installer
      self._max_concurrent_installs = max_concurrent_installs
      self._max_install_attempts = max_install_attempts
      self._install_retry_interval = install_retry_interval
      self._ray_installation_executor = ThreadPoolExecutor(
          max_workers=self._max_concurrent_installs
      )
  
file_path: ray/python/ray/autoscaler/v2/instance_manager/subscribers/threaded_ray_installer.py
imports: import logging
  import time
  from concurrent.futures import ThreadPoolExecutor
  from typing import List
  from ray.autoscaler.v2.instance_manager.instance_storage import InstanceStorage, InstanceUpdatedSubscriber
  from ray.autoscaler.v2.instance_manager.ray_installer import RayInstaller
  from ray.core.generated.instance_manager_pb2 import Instance, InstanceUpdateEvent
label_desc: Use image node_id 1 to create a new ThreadedRayInstaller object from inherited base classes: InstanceUpdatedSubscriber with example: obj = ThreadedRayInstaller(head_node_ip, instance_storage, ray_installer, max_install_attempts, install_retry_interval, max_concurrent_installs)