code: def test_write_view_offset(tempfile, dtype, height, width):
      """_io functions read views with offsets correctly"""
      out_img = np.ones((height, width), dtype=dtype)
      in_img = np.zeros((10, 10), dtype=dtype)
      with rasterio.open(
          tempfile,
          "w+",
          driver="GTiff",
          dtype=dtype,
          height=10,
          width=10,
          count=1,
      ) as dataset:
          dataset.write(in_img, 1)
      with rasterio.open(tempfile) as dataset:
          result = dataset.read(1, out=out_img[5:15, 5:15])
  
      assert (result == 0).all()
      assert (out_img[5:15, 5:15] == 0).all()
      assert (out_img[:5, :5] == 1).all()
      assert (out_img[15:, 15:] == 1).all()
  
file_path: rasterio/tests/test_gdal_raster_io.py
imports: import logging
  import sys
  import uuid
  import numpy
  import pytest
  import rasterio
label_desc: Use image node_id 7 for calling a global function with example usage: test_write_view_offset(tempfile, dtype, height, width) without return types