code: def test_create_mask_windowed_sidecar(data):
      """Writing masks by window succeeds with sidecar mask"""
      with rasterio.Env(GDAL_TIFF_INTERNAL_MASK=False):
          with rasterio.open(
              str(data.join("RGB.byte.tif")), "r+"
          ) as dst:
              for ij, window in dst.block_windows():
                  blue = dst.read(1, window=window, masked=False)
                  mask = 255 * (blue == 0).astype("uint8")
                  dst.write_mask(mask, window=window)
  
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 3 for calling a global function with example usage: test_create_mask_windowed_sidecar(data) without return types