def precision_at_position_1(sort_data):
    """ calculate precision at position 1
    Precision= (Relevant_Items_Recommended in top-k) / (k_Items_Recommended)

    Args:
        sort_data: List of tuple, (score, gold_label); score is in [0, 1], glod_label is in {0, 1}

    Return:
        precision_at_position_1

    """

    if sort_data[0][1] == 1:
        return 1
    else:
        return 0