code: def test_get_file_conflict_and_override(tmp_dir):
      tmp_dir.gen({"foo": "foo contents"})
      tmp_dir.gen({"bar": "bar contents"})
  
      with pytest.raises(FileExistsLocallyError) as exc_info:
          Repo.get_url("foo", "bar")
  
      # verify no override
      assert (tmp_dir / "bar").is_file()
      assert (tmp_dir / "bar").read_text() == "bar contents"
  
      # verify meaningful/BC exception type/errno
      assert isinstance(exc_info.value, FileExistsError)
      assert exc_info.value.errno == errno.EEXIST
  
      # now, override
      Repo.get_url("foo", "bar", force=True)
  
      assert (tmp_dir / "bar").is_file()
      assert (tmp_dir / "bar").read_text() == "foo contents"
  
file_path: dvc/tests/func/test_get_url.py
imports: import errno
  import os
  import pytest
  from dvc.config import Config
  from dvc.exceptions import FileExistsLocallyError, URLMissingError
  from dvc.repo import Repo
  from dvc.testing.workspace_tests import TestGetUrl
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_file_conflict_and_override(tmp_dir) without return types