class_docstr: Interface for getting and returning nodes from a Cloud.
  
  **Important**: This is an INTERNAL API that is only exposed for the purpose
  of implementing custom node providers. It is not allowed to call into
  NodeProvider methods from any Ray package outside the autoscaler, only to
  define new implementations of NodeProvider for use with the "external" node
  provider option.
  
  NodeProviders are namespaced by the `cluster_name` parameter; they only
  operate on nodes within that namespace.
  
  Nodes may be in one of three states: {pending, running, terminated}. Nodes
  appear immediately once started by `create_node`, and transition
  immediately to terminated when `terminate_node` is called.
class_docstr_tok: ["Interface","for","getting","and","returning","nodes","from","a","Cloud",".","*","*","Important","*","*",":","This","is","an","INTERNAL","API","that","is","only","exposed","for","the","purpose","of","implementing","custom","node","providers",".","It","is","not","allowed","to","call","into","NodeProvider","methods","from","any","Ray","package","outside","the","autoscaler",",","only","to","define","new","implementations","of","NodeProvider","for","use","with","the","``","external","''","node","provider","option",".","NodeProviders","are","namespaced","by","the","`","cluster_name","`","parameter",";","they","only","operate","on","nodes","within","that","namespace",".","Nodes","may","be","in","one","of","three","states",":","{","pending",",","running",",","terminated","}",".","Nodes","appear","immediately","once","started","by","`","create_node","`",",","and","transition","immediately","to","terminated","when","`","terminate_node","`","is","called","."]
docstr: Returns the CommandRunner class used to perform SSH commands.
  
  Args:
  log_prefix: stores "NodeUpdater: {}: ".format(<node_id>). Used
      to print progress in the CommandRunner.
  node_id: the node ID.
  auth_config: the authentication configs from the autoscaler
      yaml file.
  cluster_name: the name of the cluster.
  process_runner: the module to use to run the commands
      in the CommandRunner. E.g., subprocess.
  use_internal_ip: whether the node_id belongs to an internal ip
      or external ip.
  docker_config: If set, the docker information of the docker
      container that commands should be run on.
docstr_tok: ["Returns","the","CommandRunner","class","used","to","perform","SSH","commands",".","Args",":","log_prefix",":","stores","``","NodeUpdater",":","{","}",":","``",".format","(","<","node_id",">",")",".","Used","to","print","progress","in","the","CommandRunner",".","node_id",":","the","node","ID",".","auth_config",":","the","authentication","configs","from","the","autoscaler","yaml","file",".","cluster_name",":","the","name","of","the","cluster",".","process_runner",":","the","module","to","use","to","run","the","commands","in","the","CommandRunner",".","E.g.",",","subprocess",".","use_internal_ip",":","whether","the","node_id","belongs","to","an","internal","ip","or","external","ip",".","docker_config",":","If","set",",","the","docker","information","of","the","docker","container","that","commands","should","be","run","on","."]
code: def get_command_runner(
      self,
      log_prefix: str,
      node_id: str,
      auth_config: Dict[str, Any],
      cluster_name: str,
      process_runner: ModuleType,
      use_internal_ip: bool,
      docker_config: Optional[Dict[str, Any]] = None,
  ) -> CommandRunnerInterface:
      """Returns the CommandRunner class used to perform SSH commands.
  
      Args:
      log_prefix: stores "NodeUpdater: {}: ".format(<node_id>). Used
          to print progress in the CommandRunner.
      node_id: the node ID.
      auth_config: the authentication configs from the autoscaler
          yaml file.
      cluster_name: the name of the cluster.
      process_runner: the module to use to run the commands
          in the CommandRunner. E.g., subprocess.
      use_internal_ip: whether the node_id belongs to an internal ip
          or external ip.
      docker_config: If set, the docker information of the docker
          container that commands should be run on.
      """
      common_args = {
          "log_prefix": log_prefix,
          "node_id": node_id,
          "provider": self,
          "auth_config": auth_config,
          "cluster_name": cluster_name,
          "process_runner": process_runner,
          "use_internal_ip": use_internal_ip,
      }
      if docker_config and docker_config["container_name"] != "":
          return DockerCommandRunner(docker_config, **common_args)
      else:
          return SSHCommandRunner(**common_args)
  
imports: import logging
  from types import ModuleType
  from typing import Any, Dict, List, Optional
  from ray.autoscaler._private.command_runner import DockerCommandRunner, SSHCommandRunner
  from ray.autoscaler.command_runner import CommandRunnerInterface
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 17 for calling the NodeProvider obj's underlying member method code with example usage: obj.get_command_runner(log_prefix, node_id, auth_config, cluster_name, process_runner, use_internal_ip, docker_config) and returns: DockerCommandRunner, SSHCommandRunner