class_docstr: Generates a summary of all layers in a :class:`~lightning.pytorch.core.LightningModule`.
  
  Args:
      max_depth: The maximum depth of layer nesting that the summary will include. A value of 0 turns the
          layer summary off.
      **summarize_kwargs: Additional arguments to pass to the `summarize` method.
  
  Example::
  
      >>> from lightning.pytorch import Trainer
      >>> from lightning.pytorch.callbacks import ModelSummary
      >>> trainer = Trainer(callbacks=[ModelSummary(max_depth=1)])
code: def summarize(
      summary_data: List[Tuple[str, List[str]]],
      total_parameters: int,
      trainable_parameters: int,
      model_size: float,
      **summarize_kwargs: Any,
  ) -> None:
      summary_table = _format_summary_table(
          total_parameters,
          trainable_parameters,
          model_size,
          *summary_data,
      )
      log.info("\n" + summary_table)
  
file_path: pytorch-lightning/src/lightning/pytorch/callbacks/model_summary.py
imports: import logging
  from typing import Any, Dict, List, Tuple, Union
  from typing_extensions import override
  import lightning.pytorch
  from lightning.pytorch.callbacks.callback import Callback
  from lightning.pytorch.utilities.model_summary import DeepSpeedSummary, summarize
  from lightning.pytorch.utilities.model_summary import ModelSummary
  from lightning.pytorch.utilities.model_summary.model_summary import _format_summary_table
label_desc: Use image node_id 4 for calling the ModelSummary obj's underlying member method code with example usage: obj.summarize(summary_data, total_parameters, trainable_parameters, model_size) without return types