code: def get_summary_table(
      module_summary: ModuleSummary, human_readable_nums: bool = True
  ) -> str:
      """
      Generates a string summary_table, tabularizing the information in module_summary.
  
      Args:
          module_summary: module_summary to be printed/tabularized
          human_readable_nums: set to False for exact (e.g. 1234 vs 1.2 K)
      """
      stop_attr: List[str] = []
      # Unpack attributes
      if module_summary.flops_forward == _UNKNOWN_SIZE:
          stop_attr.append("flops_forward")
      if module_summary.flops_backward == _UNKNOWN_SIZE:
          stop_attr.append("flops_backward")
      if module_summary.in_size == _UNKNOWN_SIZE:
          stop_attr.append("in_size")
      if module_summary.out_size == _UNKNOWN_SIZE:
          stop_attr.append("out_size")
      if module_summary.forward_elapsed_time_ms == _UNKNOWN_SIZE:
          stop_attr.append("forward_elapsed_time_ms")
      unpacked_attribs, col_widths = defaultdict(list), defaultdict(int)
      _unpack_attributes(
          {"root": module_summary},
          unpacked_attribs,
          col_widths,
          human_readable_nums,
          stop_attr,
      )
  
      # Generate formatted summary_table string
      s = "{:{}}"  # inner {}: col_width
      use_attribs = [attr for attr in _ATTRIBS if attr not in stop_attr]
      n_rows, n_cols = len(unpacked_attribs[use_attribs[0]]), len(
          use_attribs
      )
      total_width = sum(col_widths.values()) + 3 * (n_cols - 1)
  
      header = [
          s.format(col_header, col_width)
          for col_header, col_width in zip(
              [_ATTRIB_TO_COL_HEADER[attr] for attr in use_attribs],
              col_widths.values(),
          )
      ]
      summary_table = (
          " | ".join(header) + "\n" + "-" * total_width + "\n"
      )
  
      for i in range(n_rows):
          row = []
          for attrib in use_attribs:
              row.append(unpacked_attribs[attrib][i])
              row = [
                  s.format(r, col_width)
                  for r, col_width in zip(row, col_widths.values())
              ]
          summary_table += " | ".join(row) + "\n"
      # Add disclaims for FLOPs:
      if (
          "flops_forward" not in stop_attr
          or "flops_backward" not in stop_attr
      ):
          from torchtnt.utils.flops import flop_mapping
  
          used_operators = "|".join(
              [
                  f"`{j.__name__}`"
                  for j in flop_mapping.keys()
                  if not j.__name__.endswith(".default")
              ]
          )
          summary_table += (
              f"Remark for FLOPs calculation: (1) Only operators {used_operators} are included. "
              + "To add more operators supported in FLOPs calculation, "
              + "please contribute to torcheval/tools/flops.py. "
              + "(2) The calculation related to additional loss function is not included. "
              + "For forward, we calculated FLOPs based on `loss = model(input_data).mean()`. "
              + "For backward, we calculated FLOPs based on `loss.backward()`. \n"
          )
      return summary_table
  
imports: import copy
  import math
  import warnings
  from collections import defaultdict, deque
  from dataclasses import dataclass, field
  from enum import Enum
  from time import perf_counter
  from typing import Any, Callable, DefaultDict, Deque, Dict, List, MutableMapping, Optional, Tuple, Union
  import torch
  from torch.nn.parameter import UninitializedParameter
  from torch.utils._pytree import PyTree, tree_flatten
  from torch.utils.hooks import RemovableHandle
  from torchtnt.utils.version import is_torch_version_geq_1_13
  from typing_extensions import Literal
label_desc: Use image node_id 7 for calling a global function with example usage: get_summary_table(module_summary, human_readable_nums) and returns: summary_table