code: def metric_max_over_ground_truths(
      metric_fn, prediction, ground_truths
  ):
      """Compute max metric between prediction and each ground truth."""
      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)
  
imports: import math
  from collections.abc import Iterable
  import numpy
  import sacrebleu
  import sklearn.metrics
  import random
  from collections import defaultdict
label_desc: Use image node_id 12 for calling a global function with example usage: metric_max_over_ground_truths(metric_fn, prediction, ground_truths) and returns: max