def trans_shape_to_bounds(transform, shape):
    """Compute bounds from transform (Affine) and shape (width, height)

    Returns
    -------
    tuple : left bottom right top
    """
    left, top = transform * (0, 0)
    right, bottom = transform * shape
    return (left, bottom, right, top)