code: def run_git(
      dir,
      name,
      command,
      desc=None,
      errdesc=None,
      custom_env=None,
      live: bool = default_command_live,
      autofix=True,
  ):
      try:
          return run(
              f'"{git}" -C "{dir}" {command}',
              desc=desc,
              errdesc=errdesc,
              custom_env=custom_env,
              live=live,
          )
      except RuntimeError:
          if not autofix:
              raise
  
      print(f"{errdesc}, attempting autofix...")
      git_fix_workspace(dir, name)
  
      return run(
          f'"{git}" -C "{dir}" {command}',
          desc=desc,
          errdesc=errdesc,
          custom_env=custom_env,
          live=live,
      )
  
imports: import logging
  import re
  import subprocess
  import os
  import shutil
  import sys
  import importlib.util
  import importlib.metadata
  import platform
  import json
  from functools import lru_cache
  from modules import cmd_args, errors
  from modules.paths_internal import script_path, extensions_dir
  from modules.timer import startup_timer
  from modules import logging_config
label_desc: Use image node_id 10 for calling a global function with example usage: run_git(dir, name, command, desc, errdesc, custom_env, live, autofix) and returns: run, run