code: def test_window():
      with rasterio.open("tests/data/RGB.byte.tif") as src:
          left, bottom, right, top = src.bounds
          dx, dy = src.res
          eps = 1.0e-8
          assert_window_almost_equals(
              src.window(
                  left + eps, bottom + eps, right - eps, top - eps
              ),
              windows.Window(0, 0, src.width, src.height),
          )
          assert src.index(left + 400, top - 400) == (1, 1)
          assert src.index(left + dx + eps, top - dy - eps) == (1, 1)
          assert_window_almost_equals(
              src.window(left, top - 400, left + 400, top),
              windows.Window(0, 0, 400 / src.res[0], 400 / src.res[1]),
          )
          assert_window_almost_equals(
              src.window(
                  left, top - 2 * dy - eps, left + 2 * dx - eps, top
              ),
              windows.Window(0, 0, 2, 2),
          )
  
imports: import numpy
  import pytest
  import rasterio
  from rasterio.errors import WindowError
  from rasterio import windows
label_desc: Use image node_id 6 for calling a global function with example usage: test_window() without return types