def metric_max_over_ground_truths(metric_fn, prediction, ground_truths):
    """
    Calculate the max prediction score of prediction against the given ground_truths.
    :param metric_fn: A metric function to evaluate the prediction
                        against the ground_truths.
    :param prediction: The prediction to evaluate.
    :param ground_truths: The ground_truths to consider.
    :return: The max score value.
    """
    max_score = 0
    for ground_truth in ground_truths:
        score = metric_fn(prediction, ground_truth)
        if score > max_score:
            max_score = score
    return max_score