def intersect(box1, box2):
    """Calculate the intersection of two boxes."""
    b1_x0, b1_y0, b1_x1, b1_y1 = box1
    b2_x0, b2_y0, b2_x1, b2_y1 = box2

    x0 = max(b1_x0, b2_x0)
    y0 = max(b1_y0, b2_y0)
    x1 = min(b1_x1, b2_x1)
    y1 = min(b1_y1, b2_y1)

    if x0 > x1 or y0 > y1:  # No intersection, return None
        return None

    return (x0, y0, x1, y1)