code: def test_patch_legacy_fault_tolerant_mode():
      with pl_legacy_patch():
          from lightning.pytorch.utilities.enums import (
              _FaultTolerantMode,
          )
  
          assert _FaultTolerantMode.AUTOMATIC.value == "automatic"
      assert not hasattr(pl.utilities.enums, "_FaultTolerantMode")
  
imports: import glob
  import logging
  import os
  import pickle
  import sys
  from unittest.mock import ANY
  import lightning.pytorch
  import pytest
  import torch
  from lightning.fabric.utilities.warnings import PossibleUserWarning
  from lightning.pytorch.utilities.migration import migrate_checkpoint, pl_legacy_patch
  from lightning.pytorch.utilities.migration.utils import _pl_migrate_checkpoint, _RedirectingUnpickler
  from lightning_utilities.core.imports import module_available
  from lightning_utilities.test.warning import no_warning_call
  from packaging.version import Version
  from tests_pytorch.checkpointing.test_legacy_checkpoints import CHECKPOINT_EXTENSION, LEGACY_BACK_COMPATIBLE_PL_VERSIONS, LEGACY_CHECKPOINTS_PATH
label_desc: Use image node_id 3 for calling a global function with example usage: test_patch_legacy_fault_tolerant_mode() without return types