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"
  
  Examples:
      .. code-block:: python
  
          from ignite.contrib.handlers.neptune_logger import *
  
          # Create a logger
          # We are using the api_token for the anonymous user neptuner but you can use your own.
  
          npt_logger = NeptuneLogger(
              api_token="ANONYMOUS",
              project_name="shared/pytorch-ignite-integration",
              experiment_name="cnn-mnist", # Optional,
              params={"max_epochs": 10}, # Optional,
              tags=["pytorch-ignite","minst"] # Optional
          )
  
          # Attach the logger to the trainer to log optimizer's parameters, e.g. learning rate at each iteration
          npt_logger.attach(
              trainer,
              log_handler=OptimizerParamsHandler(optimizer),
              event_name=Events.ITERATION_STARTED
          )
          # or equivalently
          npt_logger.attach_opt_params_handler(
              trainer,
              event_name=Events.ITERATION_STARTED,
              optimizer=optimizer
          )
code: def __call__(
      self,
      engine: Engine,
      logger: NeptuneLogger,
      event_name: Union[str, Events],
  ) -> None:
      if not isinstance(logger, NeptuneLogger):
          raise TypeError(
              "Handler OptimizerParamsHandler works only with NeptuneLogger"
          )
  
      global_step = engine.state.get_event_attrib_value(event_name)
      tag_prefix = f"{self.tag}/" if self.tag else ""
      params = {
          f"{tag_prefix}{self.param_name}/group_{i}": float(
              param_group[self.param_name]
          )
          for i, param_group in enumerate(self.optimizer.param_groups)
      }
  
      for k, v in params.items():
          logger[k].append(v, step=global_step)
  
imports: import tempfile
  import warnings
  from typing import Any, Callable, List, Mapping, Optional, Union
  import torch
  from torch.optim import Optimizer
  import ignite.distributed
  from ignite import __version__
  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
  from ignite.handlers.checkpoint import BaseSaveHandler
label_desc: Use image node_id 2 for calling the OptimizerParamsHandler obj's underlying member method code with example usage: obj.__call__(engine, logger, event_name) without return types