def intersection(box1, box2):
    """
    Args:
        box1: bounding box 
        box2: bounding box
    Returns:
        float: the area that intersects the two boxes
    """
    y_min1, x_min1, y_max1, x_max1 = box1
    y_min2, x_min2, y_max2, x_max2 = box2
    min_ymax = min(y_max1, y_max2)
    max_ymin = max(y_min1, y_min2)
    intersect_heights = max(0, min_ymax - max_ymin)
    min_xmax = min(x_max1, x_max2)
    max_xmin = max(x_min1, x_min2)
    intersect_widths = max(0, min_xmax - max_xmin)
    return intersect_heights * intersect_widths