code: def on_tmpdir_changed():
      if shared.opts.temp_dir == "" or shared.demo is None:
          return
  
      os.makedirs(shared.opts.temp_dir, exist_ok=True)
  
      register_tmp_file(
          shared.demo, os.path.join(shared.opts.temp_dir, "x")
      )
  
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 5 for calling a global function with example usage: on_tmpdir_changed() without return types