code: def test_model_summary_callback_with_enable_model_summary_true():
      trainer = Trainer(enable_model_summary=True)
      assert any(
          isinstance(cb, ModelSummary) for cb in trainer.callbacks
      )
  
      # Default value of max_depth is set as 1, when enable_model_summary is True
      # and ModelSummary is not passed in callbacks list
      model_summary_callback = list(
          filter(
              lambda cb: isinstance(cb, ModelSummary), trainer.callbacks
          )
      )[0]
      assert model_summary_callback._max_depth == 1
  
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 3 for calling a global function with example usage: test_model_summary_callback_with_enable_model_summary_true() without return types