code: def test_fail_overwrite(tmpdir):
      """Unforced overwrite of existing file fails."""
      foo_tif = tmpdir.join("foo.tif")
      foo_tif.write("content")
      with pytest.raises(FileOverwriteError) as excinfo:
          helpers.resolve_inout(
              files=[str(x) for x in tmpdir.listdir()]
          )
          assert (
              "file exists and won't be overwritten without use of the "
              in str(excinfo.value)
          )
  
file_path: rasterio/tests/test_rio_helpers.py
imports: import click
  import pytest
  from rasterio.errors import FileOverwriteError
  from rasterio.rio import helpers
label_desc: Use image node_id 7 for calling a global function with example usage: test_fail_overwrite(tmpdir) without return types