code: def webpath(fn):
      if fn.startswith(cwd):
          web_path = os.path.relpath(fn, cwd)
      else:
          web_path = os.path.abspath(fn)
  
      return f"file={web_path}?{os.path.getmtime(fn)}"
  
file_path: stable-diffusion-webui/modules/ui_gradio_extensions.py
imports: import os
  import gradio
  from modules import localization, shared, scripts
  from modules.paths import script_path, data_path, cwd
label_desc: Use image node_id 1 for calling a global function with example usage: webpath(fn) and returns: str, web_path, str, os