def f1_score(recall, precision):
    """
    This function is used to calculate the f1_score
    :param recall: This is the value of recall
    :param precision: This is the value of precision
    :return: the f1_score
    """
    return (2 * recall * precision) / float(recall + precision)