def METHOD_NAME(src_path, out_path):
    """TODO DOCUMENTME."""
    pg.info(f"Creating gallery: {src_path} at: {out_path}")
    example_dir = join(src_path, "examples")
    tutorial_dir = join(src_path, "tutorials")
    img_dir = "{{ pathto('_images', 1) }}"
    # Get examples/tutorials
    examples = [fn for fn in glob(join(example_dir, "*/*plot*.py"))
                if not join(example_dir, "dev") in fn]
    tutorials = [fn for fn in glob(join(tutorial_dir, "*/*plot*.py"))
                 if not join(tutorial_dir, "dev") in fn]
    # Get captions
    def readRSTSecTitles(fname, verbose=False):
        """ Return list of section titles found in a given RST file. """
        print('fname:', fname)
        rst_titles = re.compile(r"^(.+)\n[-=]+\n", flags=re.MULTILINE)
        with open(fname, encoding="utf8") as f:
            titles = re.findall(rst_titles, f.read())
            if verbose:
                print(("File:", fname))
                print(("Title:", titles))
        # go through lines only if compiled regex fails (py2/py3 issue)
        if not titles:
            print(("WARNING: Problem reading section title in", fname))
            with open(fname, encoding="utf8") as f:
                title = "unknown"
                for line in f.readlines():
                    if "---" in line or "===" in line:
                        titles.append(title)  # add the line after
                    title = line
        return titles[0].rstrip()
    ex_titles = [readRSTSecTitles(ex) for ex in examples]
    tut_titles = [readRSTSecTitles(tut) for tut in tutorials]
    titles = ex_titles + tut_titles
    # Adjust paths to output directory for html links
    examples = [e.replace(example_dir, "{{ pathto('_examples_auto', 1) }}")
                for e in examples]
    tutorials = [t.replace(tutorial_dir, "{{ pathto('_tutorials_auto', 1) }}")
                 for t in tutorials]
    # Create HTML gallery for sidebar with random start item
    gallery = examples + tutorials
    print(("\nAdding %d examples/tutorials to sidebar gallery.\n" %
          len(gallery)))
    print(("\t{:40}{}\n\t".format("Title", "File") + "-" * 80))
    for line in zip(titles, gallery):
        print(("\t{:40}{}".format(*line)))
    print("\n")
    html_top = """\