class_docstr: A standard class for monitoring the progress of a VTK algorithm.
  
  This must be use in a ``with`` context and it will block keyboard
  interrupts from happening until the exit event as interrupts will crash
  the kernel if the VTK algorithm is still executing.
  
  Parameters
  ----------
  algorithm
      VTK algorithm or filter.
  
  message : str, default: ""
      Message to display in the progress bar.
docstr: Initialize observer.
docstr_tok: ["Initialize","observer","."]
code: def __init__(self, algorithm, message=""):
      """Initialize observer."""
      try:
          from tqdm import tqdm  # noqa: F401
      except ImportError:
          raise ImportError(
              "Please install `tqdm` to monitor algorithms."
          )
      self.event_type = _vtk.vtkCommand.ProgressEvent
      self.progress = 0.0
      self._last_progress = self.progress
      self.algorithm = algorithm
      self.message = message
      self._interrupt_signal_received = False
      self._old_progress = 0
      self._old_handler = None
      self._progress_bar = None
  
imports: import collections
  import logging
  import os
  import re
  import signal
  import sys
  import threading
  import traceback
  from pyvista.core import _vtk_core
label_desc: Use image node_id 1 to create a new ProgressMonitor object  with example: obj = ProgressMonitor(algorithm, message)