def get_min_bbox(box_1, box_2):
    """Get the minimal bounding box around two boxes.

    Args:
        box_1: First box of coordinates (x1, y1, x2, y2). May be None.
        box_2: Second box of coordinates (x1, y1, x2, y2). May be None.
    """
    if box_1 is None:
        return box_2
    if box_2 is None:
        return box_1

    b1_x1, b1_y1, b1_x2, b1_y2 = box_1
    b2_x1, b2_y1, b2_x2, b2_y2 = box_2

    x1 = min(b1_x1, b2_x1)
    y1 = min(b1_y1, b2_y1)
    x2 = max(b1_x2, b2_x2)
    y2 = max(b1_y2, b2_y2)

    return x1, y1, x2, y2