def get_bbox_inside_image(label_bbox: list, image_bbox: list) -> list:
    """
    Corrects label_bbox so that all points are inside image bbox.
    Returns the corrected bbox.
    """
    xA = max(label_bbox[0], image_bbox[0])
    yA = max(label_bbox[1], image_bbox[1])
    xB = min(label_bbox[2], image_bbox[2])
    yB = min(label_bbox[3], image_bbox[3])
    corrected_label_bbox = [xA, yA, xB, yB]

    return corrected_label_bbox