code: def save_config_state(name):
      current_config_state = config_states.get_config()
      if not name:
          name = "Config"
      current_config_state["name"] = name
      timestamp = datetime.now().strftime("%Y_%m_%d-%H_%M_%S")
      filename = os.path.join(
          config_states_dir, f"{timestamp}_{name}.json"
      )
      print(f"Saving backup of webui/extension state to {filename}.")
      with open(filename, "w", encoding="utf-8") as f:
          json.dump(
              current_config_state, f, indent=4, ensure_ascii=False
          )
      config_states.list_config_states()
      new_value = next(
          iter(config_states.all_config_states.keys()), "Current"
      )
      new_choices = ["Current"] + list(
          config_states.all_config_states.keys()
      )
      return (
          gr.Dropdown.update(value=new_value, choices=new_choices),
          f'<span>Saved current webui/extension state to "{filename}"</span>',
      )
  
imports: import json
  import os
  import threading
  import time
  from datetime import datetime, timezone
  import git
  import gradio
  import html
  import shutil
  import errno
  from modules import extensions, shared, paths, config_states, errors, restart
  from modules.paths_internal import config_states_dir
  from modules.call_queue import wrap_gradio_gpu_call
label_desc: Use image node_id 3 for calling a global function with example usage: save_config_state(name) and returns: gr,  str, filename, str