code: def test_stage_run_ignore_sigint(dvc, mocker):
      proc = mocker.Mock()
      communicate = mocker.Mock()
      proc.configure_mock(returncode=0, communicate=communicate)
      popen = mocker.patch.object(
          subprocess, "Popen", return_value=proc
      )
      signal_mock = mocker.patch("signal.signal")
  
      dvc.run(cmd="path", name="train")
  
      popen.assert_called_once()
      communicate.assert_called_once_with()
      signal_mock.assert_any_call(signal.SIGINT, signal.SIG_IGN)
      assert (
          signal.getsignal(signal.SIGINT) == signal.default_int_handler
      )
  
file_path: dvc/tests/unit/stage/test_stage.py
imports: import os
  import signal
  import subprocess
  import threading
  import pytest
  from dvc.dependency.repo import RepoDependency
  from dvc.stage import Stage
  from dvc.stage.exceptions import StageUpdateError
label_desc: Use image node_id 7 for calling a global function with example usage: test_stage_run_ignore_sigint(dvc, mocker) without return types