code: def cleanup_tmpdr():
      temp_dir = shared.opts.temp_dir
      if temp_dir == "" or not os.path.isdir(temp_dir):
          return
  
      for root, _, files in os.walk(temp_dir, topdown=False):
          for name in files:
              _, extension = os.path.splitext(name)
              if extension != ".png":
                  continue
  
              filename = os.path.join(root, name)
              os.remove(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 6 for calling a global function with example usage: cleanup_tmpdr() without return types