docstr: :param connector: SQL connector
  :param n_parallel: number of parallel jobs
  :param key: where to find the node assignment in aup env.ini
  :param auppath: aup environment path
  :param async_run: whether the ssh job should be run asynchronously
  :param async_reconnect: number of seconds to reconnect and check job status of async job
  :param async_timeout: maximum number of seconds to try reconnection to the async job, otherwise failure
  :param reconn_wait_time: for non-async jobs, maximum number of seconds to try reconnection to the job, otherwise failure
  :param max_retries: for both async and non-async jobs, maximum number of retries for each job.
  :param kwargs: experiment.json -> resource_args will be loaded here.
docstr_tok: [":","param","connector",":","SQL","connector",":","param","n_parallel",":","number","of","parallel","jobs",":","param","key",":","where","to","find","the","node","assignment","in","aup","env.ini",":","param","auppath",":","aup","environment","path",":","param","async_run",":","whether","the","ssh","job","should","be","run","asynchronously",":","param","async_reconnect",":","number","of","seconds","to","reconnect","and","check","job","status","of","async","job",":","param","async_timeout",":","maximum","number","of","seconds","to","try","reconnection","to","the","async","job",",","otherwise","failure",":","param","reconn_wait_time",":","for","non-async","jobs",",","maximum","number","of","seconds","to","try","reconnection","to","the","job",",","otherwise","failure",":","param","max_retries",":","for","both","async","and","non-async","jobs",",","maximum","number","of","retries","for","each","job",".",":","param","kwargs",":","experiment.json","-",">","resource_args","will","be","loaded","here","."]
code: def __init__(
      self,
      connector,
      n_parallel,
      key="node_mapping",
      auppath=DEFAULT_AUPTIMIZER_PATH,
      async_reconnect=30,
      async_timeout=None,
      async_run=False,
      reconn_wait_time=30,
      max_retries=3,
      **kwargs,
  ):
      """
      :param connector: SQL connector
      :param n_parallel: number of parallel jobs
      :param key: where to find the node assignment in aup env.ini
      :param auppath: aup environment path
      :param async_run: whether the ssh job should be run asynchronously
      :param async_reconnect: number of seconds to reconnect and check job status of async job
      :param async_timeout: maximum number of seconds to try reconnection to the async job, otherwise failure
      :param reconn_wait_time: for non-async jobs, maximum number of seconds to try reconnection to the job, otherwise failure
      :param max_retries: for both async and non-async jobs, maximum number of retries for each job.
      :param kwargs: experiment.json -> resource_args will be loaded here.
      """
      super(SSHResourceManager, self).__init__(
          connector, n_parallel, **kwargs
      )
      self.mapping = self.load_node_mapping(key=key, auppath=auppath)
      self.verified = set()
      self.remote_class = Remote
      self._wait_time = reconn_wait_time
      self._n_tries = max_retries
      self._async_run = async_run
      self._async_reconnect = async_reconnect
      self._async_timeout = async_timeout
      # refresh rate of 1 second for async
      self._get_interm_res = 0.1
      self.refresh_lock = threading.Lock()
      self.s_passed_recon = 0
      self.s_passed_interm = 0
  
imports: import json
  import logging
  import os
  import sys
  import time
  import threading
  import paramiko
  from .CPUResourceManager import CPUResourceManager
  from ...utils import check_missing_key, load_default_env, parse_result, DEFAULT_AUPTIMIZER_PATH, block_until_ready
  from ...utils import open_sftp_with_timeout, parse_one_line
  from ..Job import Job
label_desc: Use image node_id 1 to create a new SSHResourceManager object from inherited base classes: CPUResourceManager with example: obj = SSHResourceManager(connector, n_parallel, key, auppath, async_reconnect, async_timeout, async_run, reconn_wait_time, max_retries)