code: def test_stage_update(dvc, mocker):
      stage = Stage(dvc, "path", "cmd")
      dep = RepoDependency({"url": "example.com"}, stage, "dep_path")
      mocker.patch.object(dep, "update", return_value=None)
  
      stage = Stage(dvc, "path", deps=[dep])
      reproduce = mocker.patch.object(stage, "reproduce")
      is_repo_import = mocker.patch(
          __name__ + ".Stage.is_repo_import",
          new_callable=mocker.PropertyMock,
      )
  
      is_repo_import.return_value = True
      with dvc.lock:
          stage.update()
      reproduce.assert_called_once_with(
          no_download=None, jobs=None, force=False
      )
  
      is_repo_import.return_value = False
      with pytest.raises(StageUpdateError):
          stage.update()
  
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 6 for calling a global function with example usage: test_stage_update(dvc, mocker) without return types