code: def test_copy_strict_failure(tmpdir, path_float_tif):
      """Ensure that strict=True raises an exception
      for a bad write instead of failing silently."""
  
      outfile = str(tmpdir.join("test_copy.jpg"))
  
      with pytest.raises(CPLE_NotSupportedError):
          rasterio.shutil.copy(
              path_float_tif, outfile, strict=True, driver="JPEG"
          )
  
file_path: rasterio/tests/test_shutil.py
imports: import os
  import numpy
  import pytest
  import rasterio
  import rasterio.shutil
  from rasterio._err import CPLE_NotSupportedError
  from rasterio.errors import DriverRegistrationError, RasterioIOError
label_desc: Use image node_id 8 for calling a global function with example usage: test_copy_strict_failure(tmpdir, path_float_tif) without return types