code: def test_window_method():
      with rasterio.open("tests/data/RGB.byte.tif") as src:
          left, bottom, right, top = src.bounds
          dx, dy = src.res
  
          assert_window_almost_equals(
              src.window(
                  left + EPS, bottom + EPS, right - EPS, top - EPS
              ),
              Window(0, 0, src.width, src.height),
          )
  
          assert_window_almost_equals(
              src.window(left, top - 400, left + 400, top),
              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
              ),
              Window(0, 0, 2, 2),
          )
  
          assert_window_almost_equals(
              src.window(
                  left - 2 * dx,
                  top - 2 * dy,
                  left + 2 * dx,
                  top + 2 * dy,
              ),
              Window(-2, -2, 4, 4),
          )
  
file_path: rasterio/tests/test_io_mixins.py
imports: from affine import Affine
  import pytest
  import rasterio
  from rasterio.windows import Window, WindowMethodsMixin
label_desc: Use image node_id 5 for calling a global function with example usage: test_window_method() without return types