class_docstr: Example Builder for sphinx documentation
code: def subdir_contents(self, path, subdirs):
      subdirs = [os.path.join(path, subdir) for subdir in subdirs]
  
      subdir_contents = "\n\n" ".. toctree::\n" "   :maxdepth: 2\n\n"
  
      for subdir in subdirs:
          index = os.path.splitext(self.rst_index_filename(subdir))[0]
          subdir_contents += "   %s\n" % os.path.relpath(index, path)
  
      subdir_contents += "\n"
      return subdir_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 15 for calling the ExampleBuilder obj's underlying member method code with example usage: obj.subdir_contents(path, subdirs) and returns: subdir_contents