code: def _run(executable, cmd, **kwargs):
      main_thread = isinstance(
          threading.current_thread(),
          threading._MainThread,  # type: ignore[attr-defined]
      )
      old_handler = None
  
      exec_cmd = _make_cmd(executable, cmd)
  
      try:
          p = subprocess.Popen(exec_cmd, **kwargs)  # noqa: S603
          if main_thread:
              old_handler = signal.signal(signal.SIGINT, signal.SIG_IGN)
  
          p.communicate()
  
          if p.returncode != 0:
              raise StageCmdFailedError(cmd, p.returncode)
      finally:
          if old_handler:
              signal.signal(signal.SIGINT, old_handler)
  
file_path: dvc/dvc/stage/run.py
imports: import os
  import signal
  import subprocess
  import threading
  from dvc.log import logger
  from dvc.utils import fix_env
  from .decorators import unlocked_repo
  from .exceptions import StageCmdFailedError
label_desc: Use image node_id 7 for calling a global function with example usage: _run(executable, cmd) without return types