code: def test_create_mask_windowed_internal_spillover(data):
      """Writing mask to a window that spills over dataset raises an error"""
      with rasterio.Env(GDAL_TIFF_INTERNAL_MASK=True):
          with rasterio.open(
              str(data.join("RGB.byte.tif")), "r+"
          ) as dst:
              mask = np.ones((1024, 1024), dtype="bool")
              with pytest.raises(RasterioIOError):
                  dst.write_mask(
                      mask, window=Window(800, 800, 1024, 1024)
                  )
  
file_path: rasterio/tests/test_mask_creation.py
imports: import numpy
  import pytest
  import rasterio
  from rasterio.enums import MaskFlags
  from rasterio.errors import RasterioIOError
  from rasterio.windows import Window
label_desc: Use image node_id 5 for calling a global function with example usage: test_create_mask_windowed_internal_spillover(data) without return types