code: def test_import_cached_file(
      mocker, erepo_dir, tmp_dir, dvc, scm, monkeypatch
  ):
      src = "some_file"
      dst = "some_file_imported"
  
      with erepo_dir.chdir():
          erepo_dir.dvc_gen({src: "hello"}, commit="add a regular file")
  
      tmp_dir.dvc_gen({dst: "hello"})
      (tmp_dir / dst).unlink()
  
      remote_exception = NoRemoteError("dvc import")
      mocker.patch.object(
          dvc.cloud, "get_remote_odb", side_effect=remote_exception
      )
      tmp_dir.dvc.imp(os.fspath(erepo_dir), src, dst)
  
      assert (tmp_dir / dst).is_file()
      assert filecmp.cmp(erepo_dir / src, tmp_dir / dst, shallow=False)
  
imports: import filecmp
  import os
  import pytest
  from funcy import first
  from dvc.cachemgr import CacheManager
  from dvc.config import NoRemoteError
  from dvc.dvcfile import load_file
  from dvc.fs import system
  from dvc.scm import Git
  from dvc.stage.exceptions import StagePathNotFoundError
  from dvc.testing.tmp_dir import make_subrepo
  from dvc.utils.fs import remove
  from dvc_data.index.index import DataIndexDirError
label_desc: Use image node_id 3 for calling a global function with example usage: test_import_cached_file(mocker, erepo_dir, tmp_dir, dvc, scm, monkeypatch) without return types