def METHOD_NAME(prediction: str, ground_truth: str):
    """ Computes f1 score between prediction and ground truth """
    prediction_tokens = QAMetrics._get_normalized_tokens(prediction)
    ground_truth_tokens = QAMetrics._get_normalized_tokens(ground_truth)
    common = collections.Counter(prediction_tokens) & collections.Counter(ground_truth_tokens)
    num_same = sum(common.values())
    # If either is no-answer, then F1 is 1 if they agree, 0 otherwise
    if len(ground_truth_tokens) == 0 or len(prediction_tokens) == 0:
        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