code: def string_f1_score(prediction, ground_truth):
      """Compute normalized token level F1
      From official ReCoRD eval script
      """
      prediction_tokens = normalize_answer(prediction).split()
      ground_truth_tokens = normalize_answer(ground_truth).split()
      common = collections.Counter(
          prediction_tokens
      ) & collections.Counter(ground_truth_tokens)
      num_same = sum(common.values())
      if num_same == 0:
          return 0
      precision = 1.0 * num_same / len(prediction_tokens)
      recall = 1.0 * num_same / len(ground_truth_tokens)
      f1 = (2 * precision * recall) / (precision + recall)
      return f1
  
imports: import re
  import string
  import collections
label_desc: Use image node_id 2 for calling a global function with example usage: string_f1_score(prediction, ground_truth) and returns: f1, int