code: def _process_events_before_scraping(plotter):
      """Process events such as changing the camera or an object before scraping."""
      if plotter.iren is not None and plotter.iren.initialized:
          # check for pyvistaqt app which can be specifically bound to pyvista plotter
          # objects in order to interact with qt, then process the events from qt
          if hasattr(plotter, "app") and plotter.app is not None:
              plotter.app.processEvents()
          plotter.update()
  
file_path: pyvista/pyvista/plotting/utilities/sphinx_gallery.py
imports: import os
  import shutil
  from typing import Iterator, List
  import pyvista
label_desc: Use image node_id 3 for calling a global function with example usage: _process_events_before_scraping(plotter) without return types