code: def print_model_summary(model_path: str, **kwargs) -> None:
      """Loads a pretrained model and prints names of weights and layers activations.
  
      # Inputs
      :param model_path: (str) filepath to pre-trained model.
  
      # Return
      :return: (`None`)
      """
      model = LudwigModel.load(model_path)
      # Model's dict inputs are wrapped in a list, required by torchinfo.
      logger.info(
          torchinfo.summary(
              model.model,
              input_data=[model.model.get_model_inputs()],
              depth=20,
          )
      )
  
      logger.info("\nModules:\n")
      for name, _ in model.model.named_children():
          logger.info(name)
  
      logger.info("\nParameters:\n")
      for name, _ in model.model.named_parameters():
          logger.info(name)
  
imports: import argparse
  import logging
  import os
  import sys
  from typing import List, Optional, Union
  import numpy
  import torch
  import torchinfo
  from ludwig.api import LudwigModel
  from ludwig.backend import ALL_BACKENDS, Backend
  from ludwig.callbacks import Callback
  from ludwig.constants import FULL, TEST, TRAINING, VALIDATION
  from ludwig.contrib import add_contrib_callback_args
  from ludwig.globals import LUDWIG_VERSION
  from ludwig.utils.print_utils import get_logging_level_registry, print_boxed, print_ludwig
  from ludwig.utils.strings_utils import make_safe_filename
label_desc: Use image node_id 4 for calling a global function with example usage: print_model_summary(model_path) without return types