docstr: Args:
      train_engine: engine with global step information, send metohod callback will be attached to it
          if None send method will be called on the end of each store call it may cause warnings and errors in
          the case of multiple engines attached
  
  Keyword Args:
      **kwargs: keyword args that will be passed to livelossplot PlotLosses class
code: def __init__(
      self,
      train_engine: Optional[ignite.engine.Engine] = None,
      **kwargs,
  ):
      """
      Args:
          train_engine: engine with global step information, send metohod callback will be attached to it
              if None send method will be called on the end of each store call it may cause warnings and errors in
              the case of multiple engines attached
  
      Keyword Args:
          **kwargs: keyword args that will be passed to livelossplot PlotLosses class
      """
      self.liveplot = PlotLosses(**kwargs)
      self.train_engine = train_engine
      if self.train_engine:
          self.train_engine.add_event_handler(
              ignite.engine.Events.EPOCH_STARTED, self.send
          )
          self.train_engine.add_event_handler(
              ignite.engine.Events.COMPLETED, self.send
          )
  
file_path: livelossplot/livelossplot/inputs/pytorch_ignite.py
imports: from typing import Optional
  import ignite.engine
  from ignite.handlers import global_step_from_engine
  from livelossplot.plot_losses import PlotLosses
label_desc: Use image node_id 1 to create a new PlotLossesCallback object  with example: obj = PlotLossesCallback(train_engine)