class_docstr: Example Builder for sphinx documentation
code: def figure_contents(self, path, filelist):
      toctree = "\n\n" ".. toctree::\n" "   :hidden:\n\n"
      contents = "\n\n"
  
      for f in filelist:
          f = os.path.join(path, f)
          rel_thumb = os.path.relpath(self.thumb_filename(f) % 1, path)
          rel_html = os.path.relpath(self.html_filename(f), path)
  
          toctree += "   ./%s\n\n" % os.path.splitext(rel_html)[0]
  
          contents += (
              ".. figure:: ./%s\n"
              "    :target: ./%s\n"
              "    :align: center\n"
              "\n"
              "    :ref:`%s`\n\n"
              % (rel_thumb, rel_html, self.sphinx_tag(f))
          )
      return toctree + contents
  
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 14 for calling the ExampleBuilder obj's underlying member method code with example usage: obj.figure_contents(path, filelist) and returns: unknown