def crop_to_bounding_box(im, bb):
    """
    Crops according to a bounding box.

    Parameters
    ----------
    bounding_box : tuple, (top, left, bottom, right)
        Crops inclusively for top/left and exclusively for bottom/right.
    """
    return im[bb[0]:bb[2], bb[1]:bb[3]]
