code: def test_global_overwrite_error_on_imports(tmp_dir, dvc):
      (tmp_dir / DEFAULT_PARAMS_FILE).dump(DATA)
      (tmp_dir / "params.json").dump(DATA)
  
      d = {"vars": [DEFAULT_PARAMS_FILE, "params.json"]}
      with pytest.raises(ResolveError) as exc_info:
          DataResolver(dvc, tmp_dir.fs_path, d)
  
      assert (
          str(exc_info.value)
          == "failed to parse 'vars' in 'dvc.yaml':\n"
          "cannot redefine 'models.bar' from 'params.json' "
          "as it already exists in 'params.yaml'"
      )
  
imports: from copy import deepcopy
  import pytest
  from dvc.parsing import DEFAULT_PARAMS_FILE, DataResolver, ResolveError
  from dvc.parsing.context import Context
  from dvc.utils.serialize import dumps_yaml
  from .None import CONTEXT_DATA, RESOLVED_DVC_YAML_DATA, TEMPLATED_DVC_YAML_DATA
label_desc: Use image node_id 10 for calling a global function with example usage: test_global_overwrite_error_on_imports(tmp_dir, dvc) without return types