code: def test_model_summary_callback_present_trainer():
      trainer = Trainer()
      assert any(
          isinstance(cb, ModelSummary) for cb in trainer.callbacks
      )
  
      trainer = Trainer(callbacks=ModelSummary())
      assert any(
          isinstance(cb, ModelSummary) for cb in trainer.callbacks
      )
  
file_path: pytorch-lightning/tests/tests_pytorch/callbacks/test_model_summary.py
imports: from typing import List, Union
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelSummary
  from lightning.pytorch.demos.boring_classes import BoringModel
label_desc: Use image node_id 1 for calling a global function with example usage: test_model_summary_callback_present_trainer() without return types