code: def from_bounds(
      left,
      bottom,
      right,
      top,
      transform=None,
      height=None,
      width=None,
      precision=None,
  ):
      """Get the window corresponding to the bounding coordinates.
  
      Parameters
      ----------
      left: float, required
          Left (west) bounding coordinates
      bottom: float, required
          Bottom (south) bounding coordinates
      right: float, required
          Right (east) bounding coordinates
      top: float, required
          Top (north) bounding coordinates
      transform: Affine, required
          Affine transform matrix.
      precision, height, width: int, optional
          These parameters are unused, deprecated in rasterio 1.3.0, and
          will be removed in version 2.0.0.
  
      Returns
      -------
      Window
          A new Window.
  
      Raises
      ------
      WindowError
          If a window can't be calculated.
  
      """
      if (
          height is not None
          or width is not None
          or precision is not None
      ):
          warnings.warn(
              "The height, width, and precision parameters are unused, deprecated, and will be removed in 2.0.0.",
              RasterioDeprecationWarning,
          )
  
      if not isinstance(transform, Affine):  # TODO: RPCs?
          raise WindowError(
              "A transform object is required to calculate the window"
          )
      if (right - left) / transform.a < 0:
          raise WindowError("Bounds and transform are inconsistent")
      if (bottom - top) / transform.e < 0:
          raise WindowError("Bounds and transform are inconsistent")
  
      rows, cols = rowcol(
          transform,
          [left, right, right, left],
          [top, top, bottom, bottom],
          op=float,
      )
      row_start, row_stop = min(rows), max(rows)
      col_start, col_stop = min(cols), max(cols)
  
      return Window(
          col_off=col_start,
          row_off=row_start,
          width=max(col_stop - col_start, 0.0),
          height=max(row_stop - row_start, 0.0),
      )
  
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 11 for calling a global function with example usage: from_bounds(left, bottom, right, top, transform, height, width, precision) and returns: Window