code: def _progress_register(self, amount_of_work, description='', stage=0, tqdm_args=None):
          
          if not self.show_progress:
              return
  
          if tqdm_args is None:
              tqdm_args = {}
  
          if not isinstance(amount_of_work, Integral):
              raise ValueError('amount_of_work has to be of integer type. But is {}'.format(type(amount_of_work)))
  
          # if we do not have enough work to do for the overhead of a progress bar just dont create a bar.
          if amount_of_work <= ProgressReporterMixin._pg_threshold:
              pg = None
          else:
              args = dict(total=amount_of_work, desc=description, dynamic_ncols=True, **tqdm_args)
              if _attached_to_ipy_notebook_with_widgets():
                  from .notebook import my_tqdm_notebook
                  pg = my_tqdm_notebook(leave=False, **args)
              else:
                  import tqdm
                  pg = tqdm.tqdm(leave=True, **args)
  
          self._prog_rep_progressbars[stage] = pg
          self._prog_rep_descriptions[stage] = description
          assert stage in self._prog_rep_progressbars
          assert stage in self._prog_rep_descriptions
docs: Registers a progress which can be reported/displayed via a progress bar.
  
          Parameters
          ----------
          amount_of_work : int
              Amount of steps the underlying algorithm has to perform.
          description : str, optional
              This string will be displayed in the progress bar widget.
          stage : int, optional, default=0
              If the algorithm has multiple different stages (eg. calculate means
              in the first pass over the data, calculate covariances in the second),
              one needs to estimate different times of arrival.