code: def setup_progress_api(app):
      return app.add_api_route(
          "/internal/progress",
          progressapi,
          methods=["POST"],
          response_model=ProgressResponse,
      )
  
file_path: stable-diffusion-webui/modules/progress.py
imports: import base64
  import io
  import time
  import gradio
  from pydantic import BaseModel, Field
  from modules.shared import opts
  import modules.shared
label_desc: Use image node_id 5 for calling a global function with example usage: setup_progress_api(app) and returns: app