code: def register_tmp_file(gradio, filename):
      if hasattr(gradio, "temp_file_sets"):  # gradio 3.15
          gradio.temp_file_sets[0] = gradio.temp_file_sets[0] | {
              os.path.abspath(filename)
          }
  
      if hasattr(gradio, "temp_dirs"):  # gradio 3.9
          gradio.temp_dirs = gradio.temp_dirs | {
              os.path.abspath(os.path.dirname(filename))
          }
  
file_path: stable-diffusion-webui/modules/ui_tempdir.py
imports: import os
  import tempfile
  from collections import namedtuple
  from pathlib import Path
  import gradio.components
  from PIL import PngImagePlugin
  from modules import shared
label_desc: Use image node_id 1 for calling a global function with example usage: register_tmp_file(gradio, filename) without return types