code: def summarize(
      lightning_module: "pl.LightningModule", max_depth: int = 1
  ) -> ModelSummary:
      """Summarize the LightningModule specified by `lightning_module`.
  
      Args:
          lightning_module: `LightningModule` to summarize.
  
          max_depth: The maximum depth of layer nesting that the summary will include. A value of 0 turns the
              layer summary off. Default: 1.
  
      Return:
          The model summary object
  
      """
      return ModelSummary(lightning_module, max_depth=max_depth)
  
imports: import contextlib
  import logging
  import math
  from collections import OrderedDict
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from torch import Tensor
  from torch.utils.hooks import RemovableHandle
  import lightning.pytorch
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.pytorch.utilities.model_helpers import _ModuleMode
  from lightning.pytorch.utilities.rank_zero import WarningCache
label_desc: Use image node_id 6 for calling a global function with example usage: summarize(lightning_module, max_depth) and returns: ModelSummary