class_docstr: Example Builder for sphinx documentation
code: def __init__(
      self,
      source_dir,
      target_dir,
      image_dir="images",
      thumb_dir="images",
      stdout_dir=".",
      script_dir=".",
      rst_dir=".",
      sphinx_tag_base="example",
      template_example=None,
      template_index=None,
      contents_file=None,
      dir_info_file=None,
      dir_footer_file=None,
      execute_files=True,
      force_rerun=False,
  ):
      self.source_dir = source_dir
      self.target_dir = target_dir
  
      self.image_dir = image_dir
      self.thumb_dir = thumb_dir
      self.stdout_dir = stdout_dir
      self.script_dir = script_dir
      self.rst_dir = rst_dir
  
      self.sphinx_tag_base = sphinx_tag_base
  
      self.contents_file = contents_file
      self.dir_info_file = dir_info_file
      self.dir_footer_file = dir_footer_file
  
      self.force_rerun = force_rerun
      self.execute_files = execute_files
  
      if template_example is None:
          self.template_example = DEFAULT_RST_TEMPLATE
      else:
          self.template_example = template_example
  
      if template_index is None:
          self.template_index = DEFAULT_INDEX_TEMPLATE
      else:
          self.template_index = template_index
  
imports: import sys
  import os
  import traceback
  import token
  import tokenize
  import gc
  import shutil
  import glob
  import warnings
  import matplotlib
  from matplotlib import image
  from matplotlib import pyplot
label_desc: Use image node_id 1 to create a new ExampleBuilder object  with example: obj = ExampleBuilder(source_dir, target_dir, image_dir, thumb_dir, stdout_dir, script_dir, rst_dir, sphinx_tag_base, template_example, template_index, contents_file, dir_info_file, dir_footer_file, execute_files, force_rerun)