code: def get_summary_and_prune(
      model: torch.nn.Module,
      *,
      max_depth: int,
      module_args: Optional[Tuple[object, ...]] = None,
      module_kwargs: Optional[Dict[str, Any]] = None,
  ) -> ModuleSummary:
      """Utility function to get module summary and then prune it"""
      module_summary = get_module_summary(
          model, module_args=module_args, module_kwargs=module_kwargs
      )
      prune_module_summary(module_summary, max_depth=max_depth)
      return module_summary
  
imports: import unittest
  from typing import Any, Dict, Optional, Tuple
  import torch
  from torchtnt.utils.module_summary import _get_human_readable_count, get_module_summary, ModuleSummary, prune_module_summary
  from torchvision import models
  from torchvision.models.alexnet import AlexNet_Weights
  from torchvision.models.resnet import ResNet18_Weights
label_desc: Use image node_id 1 for calling a global function with example usage: get_summary_and_prune(model) and returns: module_summary