def _uniquify(labels):
    """
    Takes a list of strings, and makes it unique by appending _1, _2, etc to duplicates
    In-Place

    :param labels: Input list of strings
    :return: None, modification is in-place
    """
    count_dict = dict()
    for label in labels:
        if label not in count_dict:
            count_dict.update({label: 0})
        count_dict[label] = count_dict[label] + 1
    for i in range(len(labels))[::-1]:
        if count_dict[label] > 1:
            labels[i] = labels[i] + '_' + str(count_dict[label])
            count_dict[label] = count_dict[label] - 1
