code: def metric_max_over_ground_truths(
      metric_fn, prediction, ground_truths
  ):
      scores_for_ground_truths = []
      for ground_truth in ground_truths:
          score = metric_fn(prediction, ground_truth)
          scores_for_ground_truths.append(score)
      return max(scores_for_ground_truths)
  
file_path: lm-evaluation-harness/lm_eval/jasquad/evaluate.py
imports: import argparse
  import json
  import re
  import string
  import sys
  from collections import Counter
label_desc: Use image node_id 5 for calling a global function with example usage: metric_max_over_ground_truths(metric_fn, prediction, ground_truths) and returns: max