class_docstr: Initializes a progress bar object that allows visuzalization
  of an iterational computation in the standard output screen.
  
  Parameters
  ----------
  iterations : `int`
      Number of iterations for the iterative computation.
  track_time : `bool` (default: `True`)
      Prints elapsed time when loop has finished.
  stream : `int` (default: 2).
      Setting the output stream.
      Takes `1` for stdout, `2` for stderr, or a custom stream object
  title : `str` (default: `''`).
      Setting a title for the percentage indicator.
  monitor : `bool` (default: `False`)
      Monitors CPU and memory usage if `True` (requires `psutil` package).
  update_interval : float or int (default: `None`)
      The update_interval in seconds controls how often the progress
      is flushed to the screen.
      Automatic mode if `update_interval=None`.
class_docstr_tok: ["Initializes","a","progress","bar","object","that","allows","visuzalization","of","an","iterational","computation","in","the","standard","output","screen",".","Parameters","--","--","--","--","--","iterations",":","`","int","`","Number","of","iterations","for","the","iterative","computation",".","track_time",":","`","bool","`","(","default",":","`","True","`",")","Prints","elapsed","time","when","loop","has","finished",".","stream",":","`","int","`","(","default",":","2",")",".","Setting","the","output","stream",".","Takes","`","1","`","for","stdout",",","`","2","`","for","stderr",",","or","a","custom","stream","object","title",":","`","str","`","(","default",":","`","``","`",")",".","Setting","a","title","for","the","percentage","indicator",".","monitor",":","`","bool","`","(","default",":","`","False","`",")","Monitors","CPU","and","memory","usage","if","`","True","`","(","requires","`","psutil","`","package",")",".","update_interval",":","float","or","int","(","default",":","`","None","`",")","The","update_interval","in","seconds","controls","how","often","the","progress","is","flushed","to","the","screen",".","Automatic","mode","if","`","update_interval=None","`","."]
docstr: Prints formatted percentage and tracked time to the screen.
docstr_tok: ["Prints","formatted","percentage","and","tracked","time","to","the","screen","."]
code: def _print(self, force_flush=False):
      """Prints formatted percentage and tracked time to the screen."""
      self._stream_flush()
      next_perc = self._calc_percent()
      if self.update_interval:
          do_update = (
              time.time() - self.last_time >= self.update_interval
          )
      elif force_flush:
          do_update = True
      else:
          do_update = next_perc > self.last_progress
  
      if do_update and self.active:
          self.last_progress = next_perc
          self._cache_percent_indicator(self.last_progress)
          if self.track:
              self._cached_output += " Time elapsed: " + self._get_time(
                  self._elapsed()
              )
              self._cache_eta()
          if self.item_id:
              self._cache_item_id()
          self._stream_out("\r%s" % self._cached_output)
          self._stream_flush()
          self._cached_output = ""
  
imports: import time
  from .prog_class import Prog
label_desc: Use image node_id 3 for calling the ProgPercent obj's underlying member method code with example usage: obj._print(force_flush) without return types