code: def test_fsdp_activation_checkpointing(monkeypatch):
      with pytest.raises(
          ValueError, match="cannot set both `activation_checkpointing"
      ):
          FSDPStrategy(
              activation_checkpointing=torch.nn.Linear,
              activation_checkpointing_policy=lambda *_: True,
          )
  
      monkeypatch.setattr(
          lightning.fabric.strategies.fsdp,
          "_TORCH_GREATER_EQUAL_2_1",
          True,
      )
      with pytest.deprecated_call(
          match=r"use `FSDPStrategy\(activation_checkpointing_policy"
      ):
          FSDPStrategy(activation_checkpointing=torch.nn.Linear)
  
imports: import sys
  from unittest.mock import Mock
  import lightning.fabric
  import pytest
  import torch.nn
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.plugins.precision.double import LightningDoublePrecisionModule
  from lightning.pytorch.strategies import DDPStrategy, FSDPStrategy
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_fsdp_activation_checkpointing(monkeypatch) without return types