class_docstr: Save ``pyvista.Plotter`` objects dynamically.
  
  Used by sphinx-gallery to generate the plots from the code in the examples.
  
  Pass an instance of this class to ``sphinx_gallery_conf`` in your
  ``conf.py`` as the ``"image_scrapers"`` argument.
  
  Be sure to set ``pyvista.BUILDING_GALLERY = True`` in your ``conf.py``.
  
  If the boolean variable ``PYVISTA_GALLERY_FORCE_STATIC_IN_DOCUMENT = True/False`` is set as a global
  variable in the document then its value will be used as default for the
  force_static argument of the pyvista-plot command. see also the notes at :func:plot_directive
  
  To alter the global value behavior just for some plots you may set the
  boolean variable ``PYVISTA_GALLERY_FORCE_STATIC = True``/
  ``PYVISTA_GALLERY_FORCE_STATIC = False`` just before the appropriate ``plot`` command.
  
  The default behavior of this scraper is to create interactive plots.
docstr: Save the figures generated after running example code.
  
  Called by sphinx-gallery.
docstr_tok: ["Save","the","figures","generated","after","running","example","code",".","Called","by","sphinx-gallery","."]
code: def __call__(
      self, block, block_vars, gallery_conf
  ):  # pragma: no cover
      """Save the figures generated after running example code.
  
      Called by sphinx-gallery.
  
      """
      if not pyvista.BUILDING_GALLERY:
          raise RuntimeError(BUILDING_GALLERY_ERROR_MSG)
  
      # read global option  if it exists
      force_static = block_vars["example_globals"].get(
          "PYVISTA_GALLERY_FORCE_STATIC_IN_DOCUMENT", False
      )
      # override with block specific value if it exists
      if "PYVISTA_GALLERY_FORCE_STATIC = True" in block[1].split("\n"):
          force_static = True
      elif "PYVISTA_GALLERY_FORCE_STATIC = False" in block[1].split(
          "\n"
      ):
          force_static = False
  
      if force_static is None:
          # Just in case force_static is None at this point
          force_static = False
  
      dynamic = False if force_static else True
  
      image_path_iterator = block_vars["image_path_iterator"]
      image_names = generate_images(
          image_path_iterator, dynamic=dynamic
      )
  
      return html_rst(image_names, gallery_conf["src_dir"])
  
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 2 for calling the DynamicScraper obj's underlying member method code with example usage: obj.__call__(block, block_vars, gallery_conf) and returns: html_rst