code: def window_index(window, height=0, width=0):
      """Construct a pair of slice objects for ndarray indexing
  
      Starting indexes are rounded down, Stopping indexes are rounded up.
  
      Parameters
      ----------
      window: Window
          The input window.
  
      Returns
      -------
      row_slice, col_slice: slice
          A pair of slices in row, column order
  
      """
      window = evaluate(window, height=height, width=width)
      return window.toslices()
  
imports: import collections
  from collections.abc import Iterable
  import functools
  import math
  import warnings
  from affine import Affine
  import attr
  import numpy
  from rasterio.errors import WindowError, RasterioDeprecationWarning
  from rasterio.transform import rowcol, guard_transform
label_desc: Use image node_id 17 for calling a global function with example usage: window_index(window, height, width) and returns: window