def select_bboxes(selection_bbox: dict, page_bboxes: list, tolerance: int = 10) -> list:
    """
    Filter the characters bboxes of the document page according to their x/y values.

    The result only includes the characters that are inside the selection bbox.

    :param selection_bbox: Bounding box used to select the characters bboxes.
    :param page_bboxes: Bounding boxes of the characters in the document page.
    :param tolerance: Tolerance for the coordinates values.
    :return: Selected characters bboxes.
    """
    selected_char_bboxes = [
        char_bbox
        for char_bbox in page_bboxes
        if int(selection_bbox["x0"]) - tolerance <= char_bbox["x0"]
        and int(selection_bbox["x1"]) + tolerance >= char_bbox["x1"]
        and int(selection_bbox["y0"]) - tolerance <= char_bbox["y0"]
        and int(selection_bbox["y1"]) + tolerance >= char_bbox["y1"]
    ]

    return selected_char_bboxes