code: def test_read_out_shape_resample_up():
      # Instead of testing array items, test statistics. Upsampling by an even
      # constant factor shouldn't change the mean.
      with rasterio.open("tests/data/RGB.byte.tif") as s:
          out = np.zeros((7180, 7910), dtype=rasterio.ubyte)
          data = s.read(1, out=out, masked=True)
          assert data.shape == (7180, 7910)
          assert data.mean() == s.read(1, masked=True).mean()
  
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 2 for calling a global function with example usage: test_read_out_shape_resample_up() without return types