code: def get_webui_config():
      webui_repo = None
  
      try:
          if os.path.exists(os.path.join(script_path, ".git")):
              webui_repo = git.Repo(script_path)
      except Exception:
          errors.report(
              f"Error reading webui git info from {script_path}",
              exc_info=True,
          )
  
      webui_remote = None
      webui_commit_hash = None
      webui_commit_date = None
      webui_branch = None
      if webui_repo and not webui_repo.bare:
          try:
              webui_remote = next(webui_repo.remote().urls, None)
              head = webui_repo.head.commit
              webui_commit_date = webui_repo.head.commit.committed_date
              webui_commit_hash = head.hexsha
              webui_branch = webui_repo.active_branch.name
  
          except Exception:
              webui_remote = None
  
      return {
          "remote": webui_remote,
          "commit_hash": webui_commit_hash,
          "commit_date": webui_commit_date,
          "branch": webui_branch,
      }
  
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 2 for calling a global function with example usage: get_webui_config() and returns: dict