def get_intersection_over_union(first_polygon, second_polygon):
    """
    Given two polygons returns their intersection over union
    :param first_polygon: shapely.geometry.Polygon instance
    :param second_polygon: shapely.geometry.Polygon instance
    :return: float
    """

    intersection_polygon = first_polygon.intersection(second_polygon)
    union_polygon = first_polygon.union(second_polygon)

    return intersection_polygon.area / union_polygon.area