code: def add_demos():
      for mode in docs:
          for cls in docs[mode]:
              if "demos" not in cls["tags"]:
                  continue
              cls["demos"] = []
              demos = [
                  demo.strip()
                  for demo in cls["tags"]["demos"].split(",")
              ]
              for demo in demos:
                  demo_file = os.path.join(DEMOS_DIR, demo, "run.py")
                  with open(demo_file) as run_py:
                      demo_code = run_py.read()
                  cls["demos"].append((demo, demo_code))
  
file_path: gradio/js/_website/generate_jsons/src/docs/__init__.py
imports: import html
  import json
  import os
  from gradio_client.documentation import document_cls, generate_documentation
  import gradio
  from ..guides import guides
  import requests
label_desc: Use image node_id 2 for calling a global function with example usage: add_demos() without return types