def extents_overlap(a_extent, b_extent):
    """Test if two extents overlap"""
    if (a_extent.xmin > b_extent.xmax or
        a_extent.xmax < b_extent.xmin or
        a_extent.ymin > b_extent.ymax or
        a_extent.ymax < b_extent.ymin):
        return False
    else:
        return True