code: def test_dvcfile_encoding_error(tmp_dir, dvc):
      tmp_dir.gen(PROJECT_FILE, b"\x80some: stuff")
  
      dvcfile = load_file(dvc, PROJECT_FILE)
      with pytest.raises(EncodingError):
          dvcfile._load()
  
file_path: dvc/tests/unit/test_dvcfile.py
imports: import pytest
  from dvc.dvcfile import LOCK_FILE, PROJECT_FILE, FileIsGitIgnored, ProjectFile, SingleStageFile, load_file
  from dvc.stage import PipelineStage
  from dvc.stage.exceptions import StageFileDoesNotExistError, StageFileIsNotDvcFileError
  from dvc.utils.fs import remove
  from dvc.utils.serialize import EncodingError
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 9 for calling a global function with example usage: test_dvcfile_encoding_error(tmp_dir, dvc) without return types