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 __init__(
      self,
      description: str,
      metric_names: Optional[Union[str, List[str]]] = None,
      output_transform: Optional[Callable] = None,
      closing_event_name: Union[
          Events, CallableEventWithFilter
      ] = Events.EPOCH_COMPLETED,
      state_attributes: Optional[List[str]] = None,
  ):
      if metric_names is None and output_transform is None:
          # This helps to avoid 'Either metric_names or output_transform should be defined' of BaseOutputHandler
          metric_names = []
      super(_OutputHandler, self).__init__(
          description,
          metric_names,
          output_transform,
          global_step_transform=None,
          state_attributes=state_attributes,
      )
      self.closing_event_name = closing_event_name
  
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 1 to create a new _OutputHandler object from inherited base classes: BaseOutputHandler with example: obj = _OutputHandler(description, metric_names, output_transform, closing_event_name, state_attributes)