def sort_owl_boxes_scores(boxes: List, scores: List, identifier: List) -> Tuple[List, List, List]:
    """sorts the lists based on  the scores

    Args:
        boxes (List): _description_
        scores (List): _description_
        identifier (List): _description_

    Raises:
        RuntimeError: _description_
        RuntimeError: _description_

    Returns:
        Tuple[List, List, List]: _description_
    """
    if len(scores) != len(boxes):
        # TODO use Marqo errors 
        raise RuntimeError(f"expected each bbox to have a score. found {len(boxes)} boxes and {len(scores)} scores")

    inds = scores.argsort(descending=True)
    boxes = boxes[inds]
    scores = scores[inds]

    if identifier is not None and len(identifier) != 0:
        if len(identifier) != len(boxes):
            # TODO use Marqo errors 
            raise RuntimeError(f"expected each bbox to have an identifier. " \
                f"found {len(boxes)} boxes and {len(identifier)} identifiers")
        identifier = [identifier[i] for i in inds]

    return boxes, scores, identifier
sorts the lists based on  the scores

    Args:
        boxes (List): _description_
        scores (List): _description_
        identifier (List): _description_

    Raises:
        RuntimeError: _description_
        RuntimeError: _description_

    Returns:
        Tuple[List, List, List]: _description_
    
src/marqo/s2_inference/reranking/model_utils.py