code: def test_lfs_prefetch(tmp_dir, dvc, scm, mocker):
      mock_fetch = mocker.patch("scmrepo.git.lfs.fetch")
      rev = scm.get_rev()
  
      with dvc.switch(rev):
          lfs_prefetch(dvc.dvcfs, ["foo"])
          mock_fetch.assert_not_called()
  
      tmp_dir.scm_gen(
          ".gitattributes",
          ".lfs filter=lfs diff=lfs merge=lfs -text",
          commit="init lfs",
      )
      rev = scm.get_rev()
      with dvc.switch(rev):
          lfs_prefetch(dvc.dvcfs, ["foo"])
          mock_fetch.assert_called_once()
  
file_path: dvc/tests/func/test_scm.py
imports: import os
  import pytest
  from git import Repo
  from dvc.scm import SCM, Git, NoSCM, SCMError, lfs_prefetch
label_desc: Use image node_id 5 for calling a global function with example usage: test_lfs_prefetch(tmp_dir, dvc, scm, mocker) without return types