class_docstr: Tools for generating an example page from a file
code: def __init__(self, filename, target_dir, folder):
      self.folder = folder
      self.basename = os.path.basename(filename)
      self.stripped_name = os.path.splitext(self.basename)[0]
      self.image_dir = os.path.join(target_dir, "_thumbnails", folder)
      self.png_path = os.path.join(
          self.image_dir, f"{self.stripped_name}.png"
      )
      with open(filename, encoding="utf-8") as fid:
          self.json_source = json.load(fid)
      self.default_image_loc = DEFAULT_IMG_LOC
  
file_path: pymc-examples/sphinxext/thumbnail_extractor.py
imports: import base64
  import json
  import os
  import shutil
  from glob import glob
  import matplotlib
  import matplotlib.pyplot
  from matplotlib import image
  import sphinx
label_desc: Use image node_id 1 to create a new NotebookGenerator object  with example: obj = NotebookGenerator(filename, target_dir, folder)