code: def send_errors_to_logging():
      
      error_output = vtk.vtkStringOutputWindow()
      error_win = vtk.vtkOutputWindow()
      error_win.SetInstance(error_output)
      obs = Observer()
      return obs.observe(error_output)
docs: Send all VTK error/warning messages to Python's logging module