code: def test_file(M, tmp_dir, dvc, scm):
      tmp_dir.dvc_gen("foo", "foo", commit="add foo")
      tmp_dir.dvc_gen("foo", "foobar")
      remove(tmp_dir / "foo")
  
      expected = {
          **EMPTY_STATUS,
          "committed": {"modified": ["foo"]},
          "uncommitted": {"deleted": ["foo"]},
          "git": M.dict(),
      }
      assert dvc.data_status() == expected
      assert dvc.data_status(granular=True) == expected
  
imports: from os import fspath
  from os.path import join
  import pytest
  from dvc.repo import Repo
  from dvc.repo.data import _transform_git_paths_to_dvc, posixpath_to_os_path
  from dvc.testing.tmp_dir import make_subrepo
  from dvc.utils.fs import remove
label_desc: Use image node_id 2 for calling a global function with example usage: test_file(M, tmp_dir, dvc, scm) without return types