code: def test_fabric_boring_lightning_module_automatic():
      """Test that basic LightningModules written for 'automatic optimization' work with Fabric."""
      fabric = Fabric(accelerator="cpu", devices=1)
  
      module = BoringModel()
      parameters_before = deepcopy(list(module.parameters()))
  
      optimizers, _ = module.configure_optimizers()
      dataloader = module.train_dataloader()
  
      model, optimizer = fabric.setup(module, optimizers[0])
      dataloader = fabric.setup_dataloaders(dataloader)
  
      batch = next(iter(dataloader))
      output = model.training_step(batch, 0)
      fabric.backward(output["loss"])
      optimizer.step()
  
      assert all(
          not torch.equal(before, after)
          for before, after in zip(
              parameters_before, model.parameters()
          )
      )
  
file_path: pytorch-lightning/tests/tests_pytorch/models/test_fabric_integration.py
imports: from copy import deepcopy
  from unittest.mock import Mock
  import torch
  from lightning.fabric import Fabric
  from lightning.pytorch.demos.boring_classes import BoringModel, ManualOptimBoringModel
label_desc: Use image node_id 1 for calling a global function with example usage: test_fabric_boring_lightning_module_automatic() without return types