class_docstr: Container abstracting a list of callbacks.
class_docstr_tok: ["Container","abstracting","a","list","of","callbacks","."]
docstr: Adds `Callback`s that are always present.
docstr_tok: ["Adds","`","Callback","`","s","that","are","always","present","."]
code: def _add_default_callbacks(
      self,
      add_history,
      add_progbar,
      sigint_mode: tp.Optional[SigIntMode],
  ):
      """Adds `Callback`s that are always present."""
      self._progbar = None
      self._history = None
  
      for cb in self.callbacks:
          if isinstance(cb, ProgbarLogger):
              self._progbar = cb
          elif isinstance(cb, History):
              self._history = cb
  
      if self._progbar is None and add_progbar:
          self._progbar = ProgbarLogger(count_mode="steps")
          self.callbacks.append(self._progbar)
  
      if self._history is None and add_history:
          self._history = History()
          self.callbacks.append(self._history)
  
      if sigint_mode is not None:
          self.callbacks.append(SigInt(sigint_mode))
  
imports: import collections
  import logging
  import time
  import typing
  import numpy
  from elegy.callbacks.sigint import SigInt, SigIntMode
  from .callback import Callback
  from .history import History
  from .progbar_logger import ProgbarLogger
label_desc: Use image node_id 2 for calling the CallbackList obj's underlying member method code with example usage: obj._add_default_callbacks(add_history, add_progbar, sigint_mode) without return types