code: def index(request: Request):
      names = [[p[0], p[2]] for p in all_demos]
      return templates.TemplateResponse(
          "index.html",
          {
              "request": request,
              "names": names,
              "initial_demo": names[0][0],
              "is_space": get_space(),
          },
      )
  
file_path: gradio/demo/all_demos/run.py
imports: import importlib
  import gradio
  import os
  import sys
  import copy
  import pathlib
  from fastapi import FastAPI, Request
  from fastapi.templating import Jinja2Templates
  import uvicorn
  from gradio.utils import get_space
label_desc: Use image node_id 1 for calling a global function with example usage: index(request) and returns: templates