from typing import List
from typing import Dict
from typing import Any


def _max_pred(prediction_scores: List[Dict[str, Any]]) -> Dict[str, Any]:
    """Utility function to find the maximum predicted label
    for a single prediction

    Args:
        prediction_scores (List[Dict[str, Any]]): A list of predictions with keys
            'label' and 'score'

    Returns:
        Dict[str, Any]: The 'label' and 'score' dict with the highest score value
    """
    return max(prediction_scores, key=lambda d: d["score"])