code: def add_pages_to_demo(app):
      app.add_api_route(
          "/sd_extra_networks/thumb", fetch_file, methods=["GET"]
      )
      app.add_api_route(
          "/sd_extra_networks/metadata", get_metadata, methods=["GET"]
      )
      app.add_api_route(
          "/sd_extra_networks/get-single-card",
          get_single_card,
          methods=["GET"],
      )
  
imports: import functools
  import os.path
  import urllib.parse
  from pathlib import Path
  from modules import shared, ui_extra_networks_user_metadata, errors, extra_networks
  from modules.images import read_info_from_image, save_image_with_geninfo
  import gradio
  import json
  import html
  from fastapi.exceptions import HTTPException
  from modules.generation_parameters_copypaste import image_from_url_text
  from modules.ui_components import ToolButton
label_desc: Use image node_id 7 for calling a global function with example usage: add_pages_to_demo(app) without return types