code: def list_config_states():
      global all_config_states
  
      all_config_states.clear()
      os.makedirs(config_states_dir, exist_ok=True)
  
      config_states = []
      for filename in os.listdir(config_states_dir):
          if filename.endswith(".json"):
              path = os.path.join(config_states_dir, filename)
              try:
                  with open(path, "r", encoding="utf-8") as f:
                      j = json.load(f)
                      assert (
                          "created_at" in j
                      ), '"created_at" does not exist'
                      j["filepath"] = path
                      config_states.append(j)
              except Exception as e:
                  print(f"[ERROR]: Config states {path}, {e}")
  
      config_states = sorted(
          config_states, key=lambda cs: cs["created_at"], reverse=True
      )
  
      for cs in config_states:
          timestamp = datetime.fromtimestamp(cs["created_at"]).strftime(
              "%Y-%m-%d %H:%M:%S"
          )
          name = cs.get("name", "Config")
          full_name = f"{name}: {timestamp}"
          all_config_states[full_name] = cs
  
      return all_config_states
  
file_path: stable-diffusion-webui/modules/config_states.py
imports: import os
  import json
  import tqdm
  from datetime import datetime
  import git
  from modules import shared, extensions, errors
  from modules.paths_internal import script_path, config_states_dir
label_desc: Use image node_id 1 for calling a global function with example usage: list_config_states() and returns: all_config_states