docs: def log_progress(lbl='Progress: ', length=0, flushfreq=4, startafter=-1,
                   start=True, repl=False, approx=False, disable=False,
                   writefreq=1, with_time=False, backspace=True,
                   pad_stdout=False, wfreq=None, ffreq=None, freq=None, total=None,
                   num=None, with_totaltime=None):
      """
      DEPRICATE
      FIXME: depricate for ProgressIter.
      still used in util_dev
      """
      global AGGROFLUSH
      # Alias kwargs with simpler names
      if num is not None:
          length = num
      if total is not None:
          length = total
      if wfreq is not None:
          writefreq = wfreq
      if ffreq is not None:
          flushfreq = ffreq
      if freq is not None:
          writefreq = flushfreq = freq
      if with_totaltime is not None:
          with_time = with_totaltime
      # flush frequency must be a multiple of write frequency
      flushfreq = max(int(round(flushfreq / writefreq)), 1) * writefreq
      if length < startafter or disable:
          # Do not mark progress if only executing a small number of tasks
          def mark_progress(*args):
              pass
          def end_progress(*args):
              pass
          return mark_progress, end_progress
      else:
          write_fn = util_logging._utool_write()
          flush_fn = util_logging._utool_flush()
          # build format string for displaying progress
          fmt_str = progress_str(length, lbl=lbl, repl=repl, approx=approx,
                                 backspace=backspace)
          if AGGROFLUSH:
              # Progress function which automatically flushes
              def mark_progress(count, flush_fn=flush_fn):
                  count_ = count + 1
                  write_fn(fmt_str % (count_))
                  flush_fn()
          else:
              # Progress function flushes every <flushfreq> times
              def mark_progress(count, fmt_str=fmt_str, flushfreq=flushfreq,
                                writefreq=writefreq, write_fn=write_fn,
                                flush_fn=flush_fn):
                  count_ = count + 1
                  if count_ % writefreq == 0:
                      write_fn(fmt_str % count_)
                      if count_ % flushfreq == 0:
                          flush_fn()
  
          if pad_stdout:
              write_fn('\n')
              write_fn('\n')
              flush_fn()
  
          if with_time:
              tt = util_time.tic(lbl)
  
          def end_progress(count_=length, write_fn=write_fn, flush_fn=flush_fn):
              write_fn(fmt_str % (count_))
              write_fn('\n')
              flush_fn()
              if with_time:
                  util_time.toc(tt)
              if pad_stdout:
                  write_fn('\n\n')
                  flush_fn()
          #mark_progress(0)
          if start:
              mark_progress(-1)
          return mark_progress, end_progress