class_docstr: Tools for generating an example page from a file
code: def gen_previews(self):
      preview = self.extract_preview_pic()
      if preview is not None:
          with open(self.png_path, "wb") as buff:
              buff.write(preview)
      else:
          logger.warning(
              f"Didn't find any pictures in {self.basename}",
              type="thumbnail_extractor",
          )
          shutil.copy(self.default_image_loc, self.png_path)
      create_thumbnail(self.png_path)
  
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 3 for calling the NotebookGenerator obj's underlying member method code with example usage: obj.gen_previews() without return types