class_docstr: Helper handler to log optimizer parameters
  
  Args:
      optimizer: torch optimizer or any object with attribute ``param_groups``
          as a sequence.
      param_name: parameter name
      tag: common title for all produced plots. For example, "generator"
      show_legend: flag to show legend in the window
  
  Examples:
      .. code-block:: python
  
          from ignite.contrib.handlers.visdom_logger import *
  
          # Create a logger
          vb_logger = VisdomLogger()
  
          # Attach the logger to the trainer to log optimizer's parameters, e.g. learning rate at each iteration
          vd_logger.attach(
              trainer,
              log_handler=OptimizerParamsHandler(optimizer),
              event_name=Events.ITERATION_STARTED
          )
          # or equivalently
          vd_logger.attach_opt_params_handler(
              trainer,
              event_name=Events.ITERATION_STARTED,
              optimizer=optimizer
          )
code: def __init__(
      self,
      optimizer: Optimizer,
      param_name: str = "lr",
      tag: Optional[str] = None,
      show_legend: bool = False,
  ):
      super(OptimizerParamsHandler, self).__init__(
          optimizer, param_name, tag
      )
      _BaseVisDrawer.__init__(self, show_legend=show_legend)
  
imports: import os
  from typing import Any, Callable, cast, Dict, List, Optional, Union
  import torch
  import torch.nn
  from torch.optim import Optimizer
  from ignite.contrib.handlers.base_logger import BaseLogger, BaseOptimizerParamsHandler, BaseOutputHandler, BaseWeightsScalarHandler
  from ignite.engine import Engine, Events
  from ignite.handlers import global_step_from_engine
label_desc: Use image node_id 1 to create a new OptimizerParamsHandler object from inherited base classes: BaseOptimizerParamsHandler, _BaseVisDrawer with example: obj = OptimizerParamsHandler(optimizer, param_name, tag, show_legend)