class_docstr: Helper handler to log engine's output and/or metrics
  
      pbar = ProgressBar()
  Args:
      description: progress bar description.
      metric_names: list of metric names to plot or a string "all" to plot all available
          metrics.
      output_transform: output transform function to prepare `engine.state.output` as a number.
          For example, `output_transform = lambda output: output`
          This function can also return a dictionary, e.g `{'loss': loss1, 'another_loss': loss2}` to label the plot
          with corresponding keys.
      closing_event_name: event's name on which the progress bar is closed. Valid events are from
          :class:`~ignite.engine.events.Events` or any `event_name` added by
          :meth:`~ignite.engine.engine.Engine.register_events`.
      state_attributes: list of attributes of the ``trainer.state`` to plot.
class_docstr_tok: ["Helper","handler","to","log","engine","'s","output","and\/or","metrics","pbar","=","ProgressBar","(",")","Args",":","description",":","progress","bar","description",".","metric_names",":","list","of","metric","names","to","plot","or","a","string","``","all","''","to","plot","all","available","metrics",".","output_transform",":","output","transform","function","to","prepare","`","engine.state.output","`","as","a","number",".","For","example",",","`","output_transform","=","lambda","output",":","output","`","This","function","can","also","return","a","dictionary",",","e.g","`","{","'loss","'",":","loss1",",","'another_loss","'",":","loss2","}","`","to","label","the","plot","with","corresponding","keys",".","closing_event_name",":","event","'s","name","on","which","the","progress","bar","is","closed",".","Valid","events","are","from",":","class",":","`","~ignite.engine.events.Events","`","or","any","`","event_name","`","added","by",":","meth",":","`","~ignite.engine.engine.Engine.register_events","`",".","state_attributes",":","list","of","attributes","of","the","``","trainer.state","``","to","plot","."]
code: def __call__(
      self,
      engine: Engine,
      logger: ProgressBar,
      event_name: Union[str, Events],
  ) -> None:
      pbar_total = self.get_max_number_events(event_name, engine)
      if logger.pbar is None:
          logger._reset(pbar_total=pbar_total)
  
      max_epochs = engine.state.max_epochs
      default_desc = "Iteration" if max_epochs == 1 else "Epoch"
  
      desc = self.tag or default_desc
      max_num_of_closing_events = self.get_max_number_events(
          self.closing_event_name, engine
      )
      if max_num_of_closing_events and max_num_of_closing_events > 1:
          global_step = engine.state.get_event_attrib_value(
              self.closing_event_name
          )
          desc += f" [{global_step}/{max_num_of_closing_events}]"
      logger.pbar.set_description(desc)  # type: ignore[attr-defined]
  
      rendered_metrics = self._setup_output_metrics_state_attrs(
          engine, log_text=True
      )
      metrics = OrderedDict()
      for key, value in rendered_metrics.items():
          key = "_".join(key[1:])  # tqdm has tag as description
  
          metrics[key] = value
  
      if metrics:
          logger.pbar.set_postfix(metrics)  # type: ignore[attr-defined]
  
      global_step = engine.state.get_event_attrib_value(event_name)
      if pbar_total is not None:
          global_step = (global_step - 1) % pbar_total + 1
      logger.pbar.update(global_step - logger.pbar.n)
  
imports: from collections import OrderedDict
  from typing import Any, Callable, List, Optional, Union
  from ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler
  from ignite.engine import Engine, Events
  from ignite.engine.events import CallableEventWithFilter, RemovableEventHandle
label_desc: Use image node_id 3 for calling the _OutputHandler obj's underlying member method code with example usage: obj.__call__(engine, logger, event_name) without return types