class_docstr: Contains all necessary SSH configs, grouped by config name.
class_docstr_tok: ["Contains","all","necessary","SSH","configs",",","grouped","by","config","name","."]
docstr: Initialize the object with a dictionary of SSH information.
  
  Args:
      info (dict): any SSH information needed for remote control.
          This dict should map from identifier to dict of SSH info
          (username, port, keyfile, etc.).
      node_groups (dict): mapping from hostnames to SSH group names.
      gpu_devices: GPU devices in each node
code: def __init__(
      self,
      info: Dict[str, Dict],
      node_groups: Dict[str, str],
      gpu_devices: Dict[str, str],
  ):
      """
      Initialize the object with a dictionary of SSH information.
  
      Args:
          info (dict): any SSH information needed for remote control.
              This dict should map from identifier to dict of SSH info
              (username, port, keyfile, etc.).
          node_groups (dict): mapping from hostnames to SSH group names.
          gpu_devices: GPU devices in each node
      """
      super().__init__()
  
      # Construct SSH Group to SSH Config mapping
      conf_map = {}
      for key, ssh_info in info.items():
          # Parse out information from sub-dict
          conf_map[key] = SSHConfig(
              username=ssh_info.get("username", ""),
              port=ssh_info.get("port", 22),
              python_venv=ssh_info.get("python_venv", ""),
              key_file=ssh_info.get("key_file", ""),
              pkey=self._gen_rsa_pkey(ssh_info.get("key_file", None)),
              env=dict(
                  TF_CPP_MIN_LOG_LEVEL=0,
                  **ssh_info.get("shared_envs", {}),
              ),
          )
  
      # Use conf_map to construct Hostname to SSH Config mapping
      for hostname, group in node_groups.items():
          self[hostname] = conf_map.get(group)
  
imports: import os
  import re
  from enum import Enum
  from typing import NamedTuple, Optional, Dict
  import yaml
  import paramiko
  from autodist.utils import logging
  from autodist.utils.network import is_loopback_address, is_local_address
label_desc: Use image node_id 1 to create a new SSHConfigMap object from inherited base classes: dict with example: obj = SSHConfigMap(info, node_groups, gpu_devices)