def METHOD_NAME(prediction: abc.Sequence, ground_truth: abc.Sequence):
    """Calculate the F1 score of the prediction and the ground_truth.
    Args:
        prediction: the predicted answer.
        ground_truth: the correct answer.
    Returns:
        The F1 score of prediction. Float point number.
    """
    assert isinstance(prediction, abc.Sequence) and isinstance(
        ground_truth, abc.Sequence
    ), "prediction and ground_truth should be Sequence"
    common = Counter(prediction) & Counter(ground_truth)
    num_same = sum(common.values())
    if num_same == 0:
        return 0
    precision = 1.0 * num_same / len(prediction)
    recall = 1.0 * num_same / len(ground_truth)
    f1 = (2 * precision * recall) / (precision + recall)
    return f1