code: def _patch_classes() -> None:
      classes_map = (
          # module name, old name, new class
          (
              "bitsandbytes",
              "BitsandbytesPrecisionPlugin",
              BitsandbytesPrecision,
          ),
          ("deepspeed", "DeepSpeedPrecisionPlugin", DeepSpeedPrecision),
          ("double", "DoublePrecisionPlugin", DoublePrecision),
          ("fsdp", "FSDPPrecisionPlugin", FSDPPrecision),
          ("fsdp", "FSDPMixedPrecisionPlugin", FSDPPrecision),
          ("half", "HalfPrecisionPlugin", HalfPrecision),
          ("amp", "MixedPrecisionPlugin", MixedPrecision),
          ("precision", "PrecisionPlugin", Precision),
          (
              "transformer_engine",
              "TransformerEnginePrecisionPlugin",
              TransformerEnginePrecision,
          ),
          ("xla", "XLAPrecisionPlugin", XLAPrecision),
      )
  
      for module_name, deprecated_name, new_class in classes_map:
          deprecated_class = _create_class(deprecated_name, new_class)
          setattr(
              getattr(pl.plugins.precision, module_name),
              deprecated_name,
              deprecated_class,
          )
          setattr(
              pl.plugins.precision, deprecated_name, deprecated_class
          )
          setattr(pl.plugins, deprecated_name, deprecated_class)
  
      # special treatment for `FSDPMixedPrecisionPlugin` because it has a different signature
      setattr(
          pl.plugins.precision.fsdp,
          "FSDPMixedPrecisionPlugin",
          FSDPMixedPrecisionPlugin,
      )
      setattr(
          pl.plugins.precision,
          "FSDPMixedPrecisionPlugin",
          FSDPMixedPrecisionPlugin,
      )
      setattr(
          pl.plugins,
          "FSDPMixedPrecisionPlugin",
          FSDPMixedPrecisionPlugin,
      )
  
file_path: pytorch-lightning/src/lightning/pytorch/_graveyard/precision.py
imports: import sys
  from typing import TYPE_CHECKING, Any, Literal, Optional
  import lightning.pytorch
  from lightning.fabric.utilities.rank_zero import rank_zero_deprecation
  from lightning.pytorch.plugins.precision import BitsandbytesPrecision, DeepSpeedPrecision, DoublePrecision, FSDPPrecision, HalfPrecision, MixedPrecision, Precision, TransformerEnginePrecision, XLAPrecision
label_desc: Use image node_id 3 for calling a global function with example usage: _patch_classes() without return types