code: def demo_listing_table(root):
      repo_dir = os.getcwd()
  
      os.chdir(root)
      try:
          yield "| Demo | Source |"
          yield "|---|---|"
          # sort the demos to get a consistent order, independent of the file system traversal order
          for demo in sorted(glob.iglob("**/*.ipynb", recursive=True)):
              if ".ipynb_checkpoint" in demo:
                  continue
  
              notebook = nbformat.read(demo, as_version=4)
              markdown = "".join(notebook.cells[0].source)
              title = TITLE_RE.match(markdown)
              text = title[1]
  
              demo_html = demo.replace(".ipynb", ".html")
              url = os.path.join(DOC_URL_BASE, root, demo_html)
  
              # this looks better if the two links are separated (hence ; and the explicit new line),
              # and the "open here" doesn't get split across lines (hence non-breaking space)
              yield f"| [{text}]({url}) | [source]({demo}) |"
      finally:
          os.chdir(repo_dir)
  
imports: import abc
  import argparse
  import contextlib
  import difflib
  import enum
  import glob
  import itertools
  import json
  import nbformat
  import os.path
  import re
  import subprocess
  import sys
  import textwrap
label_desc: Use image node_id 8 for calling a global function with example usage: demo_listing_table(root) without return types