code: def test_read_out_shape_resample_down():
      with rasterio.open("tests/data/RGB.byte.tif") as s:
          out = np.zeros((8, 8), dtype=rasterio.ubyte)
          data = s.read(1, out=out)
          expected = np.array(
              [
                  [0, 0, 20, 15, 0, 0, 0, 0],
                  [0, 6, 193, 9, 255, 127, 23, 39],
                  [0, 7, 27, 255, 193, 14, 28, 34],
                  [0, 31, 29, 44, 14, 22, 43, 0],
                  [0, 9, 69, 49, 17, 22, 255, 0],
                  [11, 7, 13, 25, 13, 29, 33, 0],
                  [8, 10, 88, 27, 20, 33, 25, 0],
                  [0, 0, 0, 0, 98, 23, 0, 0],
              ],
              dtype=np.uint8,
          )
          assert (data == expected).all()
  
file_path: rasterio/tests/test_read_resample.py
imports: import numpy
  import pytest
  import rasterio
  from rasterio.enums import Resampling
  from rasterio.errors import ResamplingAlgorithmError
  from rasterio.windows import Window
  from .conftest import requires_gdal33
label_desc: Use image node_id 1 for calling a global function with example usage: test_read_out_shape_resample_down() without return types