code: def test_load_when_lockfile_is_corrupted(tmp_dir, dvc, corrupt_data):
      (tmp_dir / "Dvcfile.lock").dump(corrupt_data)
      lockfile = Lockfile(dvc, "Dvcfile.lock")
      with pytest.raises(YAMLValidationError) as exc_info:
          lockfile.load()
      assert "Dvcfile.lock" in str(exc_info.value)
  
file_path: dvc/tests/unit/test_lockfile.py
imports: import pytest
  from dvc.dvcfile import FileIsGitIgnored, Lockfile
  from dvc.stage import PipelineStage
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 6 for calling a global function with example usage: test_load_when_lockfile_is_corrupted(tmp_dir, dvc, corrupt_data) without return types