class_docstr: The Connector parses several Fabric arguments and instantiates the Strategy including its owned components.
  
      A. accelerator flag could be:
          1. accelerator class
          2. accelerator str
          3. accelerator auto
  
      B. strategy flag could be:
          1. strategy class
          2. strategy str registered with STRATEGY_REGISTRY
          3. strategy str in _strategy_type enum which listed in each strategy as
             backend (registed these too, and _strategy_type could be deprecated)
  
      C. plugins flag could be:
          1. precision class (should be removed, and precision flag should allow user pass classes)
          2. checkpoint_io class
          3. cluster_environment class
  
  priorities which to take when:
      A. Class > str
      B. Strategy > Accelerator/precision/plugins
code: def __init__(
      self,
      accelerator: Union[str, Accelerator] = "auto",
      strategy: Union[str, Strategy] = "auto",
      devices: Union[List[int], str, int] = "auto",
      num_nodes: int = 1,
      precision: Optional[_PRECISION_INPUT] = None,
      plugins: Optional[
          Union[_PLUGIN_INPUT, List[_PLUGIN_INPUT]]
      ] = None,
  ) -> None:
      # These arguments can be set through environment variables set by the CLI
      accelerator = self._argument_from_env(
          "accelerator", accelerator, default="auto"
      )
      strategy = self._argument_from_env(
          "strategy", strategy, default="auto"
      )
      devices = self._argument_from_env(
          "devices", devices, default="auto"
      )
      num_nodes = int(
          self._argument_from_env("num_nodes", num_nodes, default=1)
      )
      precision = self._argument_from_env(
          "precision", precision, default=None
      )
  
      # 1. Parsing flags
      # Get registered strategies, built-in accelerators and precision plugins
      self._registered_strategies = (
          STRATEGY_REGISTRY.available_strategies()
      )
      self._registered_accelerators = (
          ACCELERATOR_REGISTRY.available_accelerators()
      )
  
      # Raise an exception if there are conflicts between flags
      # Set each valid flag to `self._x_flag` after validation
      # For devices: Assign gpus, etc. to the accelerator flag and devices flag
      self._strategy_flag: Union[Strategy, str] = "auto"
      self._accelerator_flag: Union[Accelerator, str] = "auto"
      self._precision_input: _PRECISION_INPUT_STR = "32-true"
      self._precision_instance: Optional[Precision] = None
      self._cluster_environment_flag: Optional[
          Union[ClusterEnvironment, str]
      ] = None
      self._parallel_devices: List[Union[int, torch.device, str]] = []
      self.checkpoint_io: Optional[CheckpointIO] = None
  
      self._check_config_and_set_final_flags(
          strategy=strategy,
          accelerator=accelerator,
          precision=precision,
          plugins=plugins,
      )
      self._check_device_config_and_set_final_flags(
          devices=devices, num_nodes=num_nodes
      )
  
      # 2. Instantiate Accelerator
      # handle `auto`, `None` and `gpu`
      if self._accelerator_flag == "auto":
          self._accelerator_flag = self._choose_auto_accelerator()
      elif self._accelerator_flag == "gpu":
          self._accelerator_flag = (
              self._choose_gpu_accelerator_backend()
          )
  
      self._set_parallel_devices_and_init_accelerator()
  
      # 3. Instantiate ClusterEnvironment
      self.cluster_environment: ClusterEnvironment = (
          self._choose_and_init_cluster_environment()
      )
  
      # 4. Instantiate Strategy - Part 1
      if self._strategy_flag == "auto":
          self._strategy_flag = self._choose_strategy()
      # In specific cases, ignore user selection and fall back to a different strategy
      self._check_strategy_and_fallback()
      self._init_strategy()
  
      # 5. Instantiate Precision Plugin
      self.precision = self._check_and_init_precision()
  
      # 6. Instantiate Strategy - Part 2
      self._lazy_init_strategy()
  
imports: import os
  from collections import Counter
  from typing import Any, Dict, List, Optional, Union, cast
  import torch
  from typing_extensions import get_args
  from lightning.fabric.accelerators import ACCELERATOR_REGISTRY
  from lightning.fabric.accelerators.accelerator import Accelerator
  from lightning.fabric.accelerators.cuda import CUDAAccelerator
  from lightning.fabric.accelerators.mps import MPSAccelerator
  from lightning.fabric.accelerators.xla import XLAAccelerator
  from lightning.fabric.plugins import CheckpointIO, DeepSpeedPrecision, HalfPrecision, MixedPrecision, Precision, TransformerEnginePrecision, XLAPrecision
  from lightning.fabric.plugins.environments import ClusterEnvironment, LightningEnvironment, LSFEnvironment, MPIEnvironment, SLURMEnvironment, TorchElasticEnvironment
  from lightning.fabric.plugins.precision.double import DoublePrecision
  from lightning.fabric.plugins.precision.fsdp import FSDPPrecision
  from lightning.fabric.plugins.precision.precision import _PRECISION_INPUT, _PRECISION_INPUT_INT, _PRECISION_INPUT_STR, _PRECISION_INPUT_STR_ALIAS, _PRECISION_INPUT_STR_ALIAS_CONVERSION
  from lightning.fabric.strategies import STRATEGY_REGISTRY, DeepSpeedStrategy, ParallelStrategy, SingleDeviceStrategy, SingleDeviceXLAStrategy, Strategy, XLAFSDPStrategy, XLAStrategy
  from lightning.fabric.strategies.ddp import _DDP_FORK_ALIASES
  from lightning.fabric.strategies.fsdp import _FSDP_ALIASES, FSDPStrategy
  from lightning.fabric.utilities import rank_zero_info, rank_zero_warn
  from lightning.fabric.utilities.device_parser import _determine_root_gpu_device
  from lightning.fabric.utilities.imports import _IS_INTERACTIVE
label_desc: Use image node_id 1 to create a new _Connector object  with example: obj = _Connector(accelerator, strategy, devices, num_nodes, precision, plugins)