code: def test_fabric_call_lightning_module_hooks():
      """Test that `Fabric.call` can call hooks on the LightningModule."""
  
      class HookedModel(BoringModel):
          def on_train_start(self):
              pass
  
          def on_my_custom_hook(self, arg, kwarg=None):
              pass
  
      fabric = Fabric(accelerator="cpu", devices=1)
      module = Mock(wraps=HookedModel())
  
      _ = fabric.setup(module)
      _ = fabric.setup(
          module
      )  # shouldn't add module to callbacks a second time
      assert fabric._callbacks == [module]
  
      fabric.call("on_train_start")
      module.on_train_start.assert_called_once_with()
  
      fabric.call("on_my_custom_hook", 1, kwarg="test")
      module.on_my_custom_hook.assert_called_once_with(1, kwarg="test")
  
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 3 for calling a global function with example usage: test_fabric_call_lightning_module_hooks() without return types