code: def test_artifacts_read_fails_on_id_duplication(tmp_dir, dvc):
      with open(tmp_dir / "dvc.yaml", "w") as f:
          f.write(bad_dvcyaml_id_duplication)
  
      with pytest.raises(YAMLSyntaxError):
          tmp_dir.dvc.artifacts.read()
  
file_path: dvc/tests/func/artifacts/test_artifacts.py
imports: import logging
  import os
  from copy import deepcopy
  import pytest
  from dvc.annotations import Artifact
  from dvc.exceptions import ArtifactNotFoundError, InvalidArgumentError
  from dvc.repo.artifacts import check_name_format
  from dvc.utils.strictyaml import YAMLSyntaxError, YAMLValidationError
label_desc: Use image node_id 7 for calling a global function with example usage: test_artifacts_read_fails_on_id_duplication(tmp_dir, dvc) without return types