@staticmethod
def _calc_bbox(slices):
    """
        Calculate a minimal bounding box in the form ``((ymin, ymax),
        (xmin, xmax))``.  Note these are pixel locations, not slice
        indices.  For ``mode='partial'``, the bounding box indices are
        for the valid (non-filled) cutout values.
        """
    return (slices[0].start, slices[0].stop - 1), (slices[1].start, slices[
        1].stop - 1)
