def _tile_exists(raster_bounds, tile_bounds):
    """Check if a tile is inside a given bounds."""
    return tile_bounds[0] < raster_bounds[2] and tile_bounds[2
        ] > raster_bounds[0] and tile_bounds[3] > raster_bounds[1
        ] and tile_bounds[1] < raster_bounds[3]
