code: def from_bounds(west, south, east, north, width, height):
      """Return an Affine transformation given bounds, width and height.
  
      Return an Affine transformation for a georeferenced raster given
      its bounds `west`, `south`, `east`, `north` and its `width` and
      `height` in number of pixels.
  
      """
      return Affine.translation(west, north) * Affine.scale(
          (east - west) / width, (south - north) / height
      )
  
imports: from contextlib import ExitStack
  from functools import partial
  import math
  import numpy
  import warnings
  from affine import Affine
  from rasterio.env import env_ctx_if_needed
  from rasterio._transform import _transform_from_gcps, RPCTransformerBase, GCPTransformerBase
  from rasterio.enums import TransformDirection, TransformMethod
  from rasterio.control import GroundControlPoint
  from rasterio.rpc import RPC
  from rasterio.errors import TransformError, RasterioDeprecationWarning
label_desc: Use image node_id 5 for calling a global function with example usage: from_bounds(west, south, east, north, width, height) and returns: unknown