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
docstr: Lazily set missing attributes on the previously instantiated strategy.
docstr_tok: ["Lazily","set","missing","attributes","on","the","previously","instantiated","strategy","."]
code: def _lazy_init_strategy(self) -> None:
      """Lazily set missing attributes on the previously instantiated strategy."""
      self.strategy.accelerator = self.accelerator
      if self.precision:
          self.strategy.precision = self.precision
      if self.checkpoint_io:
          self.strategy.checkpoint_io = self.checkpoint_io
      if hasattr(self.strategy, "cluster_environment"):
          if self.strategy.cluster_environment is None:
              self.strategy.cluster_environment = (
                  self.cluster_environment
              )
          self.cluster_environment = self.strategy.cluster_environment
      if hasattr(self.strategy, "parallel_devices"):
          if self.strategy.parallel_devices:
              self._parallel_devices = self.strategy.parallel_devices
          else:
              self.strategy.parallel_devices = self._parallel_devices
      if hasattr(self.strategy, "num_nodes"):
          self.strategy._num_nodes = self._num_nodes_flag
      if hasattr(self.strategy, "_set_world_ranks"):
          self.strategy._set_world_ranks()
      self.strategy._configure_launcher()
  
      if (
          _IS_INTERACTIVE
          and self.strategy.launcher
          and not self.strategy.launcher.is_interactive_compatible
      ):
          raise RuntimeError(
              f"`Fabric(strategy={self._strategy_flag!r})` is not compatible with an interactive"
              " environment. Run your code as a script, or choose one of the compatible strategies:"
              f" `Fabric(strategy='dp'|'ddp_notebook')`."
              " In case you are spawning processes yourself, make sure to include the Fabric"
              " creation inside the worker function."
          )
  
      # TODO: should be moved to _check_strategy_and_fallback().
      # Current test check precision first, so keep this check here to meet error order
      if isinstance(
          self.accelerator, XLAAccelerator
      ) and not isinstance(
          self.strategy,
          (SingleDeviceXLAStrategy, XLAStrategy, XLAFSDPStrategy),
      ):
          raise ValueError(
              "The `XLAAccelerator` can only be used with a `SingleDeviceXLAStrategy`, `XLAStrategy`, or"
              f" `XLAFSDPStrategy`. Found {self.strategy.__class__.__name__}."
          )
  
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 13 for calling the _Connector obj's underlying member method code with example usage: obj._lazy_init_strategy() without return types