code: def f1_score(prediction, ground_truth):
      """computes f1 score between prediction and ground truth"""
      prediction_tokens = _get_tokens(prediction)
      ground_truth_tokens = _get_tokens(ground_truth)
      common = collections.Counter(
          prediction_tokens
      ) & collections.Counter(ground_truth_tokens)
      num_same = sum(common.values())
      if len(ground_truth_tokens) == 0 or len(prediction_tokens) == 0:
          # If either is no-answer, then F1 is 1 if they agree, 0 otherwise
          return int(ground_truth_tokens == prediction_tokens)
      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 collections
  from typing import List
  import ijson
  import numpy
  from transformers.models.bert.tokenization_bert import BasicTokenizer
  from nemo.collections.nlp.data.data_utils import DataProcessor, check_chinese_char, normalize_answer, normalize_chinese_answer
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling a global function with example usage: f1_score(prediction, ground_truth) and returns: f1, int, int