code: def _write_histogram_parameters(
      summary_writer: SummaryWriter,
      modules: Dict[str, torch.nn.Module],
      step: int,
  ) -> None:
      for module_name, module in modules.items():
          for param_name, parameter in module.named_parameters():
              summary_writer.add_histogram(
                  f"Parameters/{module_name}/{param_name}",
                  parameter,
                  global_step=step,
              )
  
file_path: tnt/torchtnt/framework/callbacks/tensorboard_parameter_monitor.py
imports: from typing import Dict, Optional, Union
  import torch
  from torch.utils.tensorboard import SummaryWriter
  from torchtnt.framework.callback import Callback
  from torchtnt.framework.state import State
  from torchtnt.framework.unit import TTrainUnit
  from torchtnt.utils.loggers.tensorboard import TensorBoardLogger
label_desc: Use image node_id 1 for calling a global function with example usage: _write_histogram_parameters(summary_writer, modules, step) without return types