code: def test_copy_strict_silent_failure(tmpdir, path_float_tif):
      """Ensure that strict=False allows a bad write
      to fail silently.  The raster will exist but
      will not be valid"""
  
      outfile = str(tmpdir.join("test_copy.jpg"))
  
      rasterio.shutil.copy(
          path_float_tif, outfile, strict=False, driver="JPEG"
      )
  
      with rasterio.open(outfile) as dst:
          assert dst.driver == "JPEG"
          assert dst.read().max() == 0
  
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 9 for calling a global function with example usage: test_copy_strict_silent_failure(tmpdir, path_float_tif) without return types