code: def run(
      command,
      desc=None,
      errdesc=None,
      custom_env=None,
      live: bool = default_command_live,
  ) -> str:
      if desc is not None:
          print(desc)
  
      run_kwargs = {
          "args": command,
          "shell": True,
          "env": os.environ if custom_env is None else custom_env,
          "encoding": "utf8",
          "errors": "ignore",
      }
  
      if not live:
          run_kwargs["stdout"] = run_kwargs["stderr"] = subprocess.PIPE
  
      result = subprocess.run(**run_kwargs)
  
      if result.returncode != 0:
          error_bits = [
              f"{errdesc or 'Error running command'}.",
              f"Command: {command}",
              f"Error code: {result.returncode}",
          ]
          if result.stdout:
              error_bits.append(f"stdout: {result.stdout}")
          if result.stderr:
              error_bits.append(f"stderr: {result.stderr}")
          raise RuntimeError("\n".join(error_bits))
  
      return result.stdout or ""
  
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 4 for calling a global function with example usage: run(command, desc, errdesc, custom_env, live) and returns: unknown