code: def test_update_import_after_remote_updates_to_dvc(
      tmp_dir, dvc, erepo_dir
  ):
      old_rev = None
      with erepo_dir.branch("branch", new=True), erepo_dir.chdir():
          erepo_dir.scm_gen(
              "version", "branch", commit="add version file"
          )
          old_rev = erepo_dir.scm.get_rev()
  
      stage = dvc.imp(
          os.fspath(erepo_dir), "version", "version", rev="branch"
      )
  
      imported = tmp_dir / "version"
      assert imported.is_file()
      assert imported.read_text() == "branch"
      assert stage.deps[0].def_repo == {
          "url": os.fspath(erepo_dir),
          "rev": "branch",
          "rev_lock": old_rev,
      }
  
      new_rev = None
      with erepo_dir.branch("branch", new=False), erepo_dir.chdir():
          erepo_dir.scm.gitpython.repo.index.remove(["version"])
          erepo_dir.dvc_gen(
              "version", "updated", commit="upgrade to DVC tracking"
          )
          new_rev = erepo_dir.scm.get_rev()
  
      assert old_rev != new_rev
  
      (status,) = dvc.status([stage.path])["version.dvc"]
      (changed_dep,) = list(status["changed deps"].items())
      assert changed_dep[0].startswith("version ")
      assert changed_dep[1] == "update available"
  
      dvc.update([stage.path])
  
      assert dvc.status([stage.path]) == {}
  
      assert imported.is_file()
      assert imported.read_text() == "updated"
  
      stage = load_file(dvc, stage.path).stage
      assert stage.deps[0].def_repo == {
          "url": os.fspath(erepo_dir),
          "rev": "branch",
          "rev_lock": new_rev,
      }
  
imports: import os
  import pytest
  from dvc.dependency import base
  from dvc.dvcfile import load_file
  from dvc.exceptions import InvalidArgumentError
  from dvc.testing.tmp_dir import make_subrepo
label_desc: Use image node_id 2 for calling a global function with example usage: test_update_import_after_remote_updates_to_dvc(tmp_dir, dvc, erepo_dir) without return types