def string_labels_to_int(Y):
    keys = {}
    new_Y = []
    for item in Y:
        if (item in keys):
            new_Y.append(keys[item])
        else:
            keys.update({item: (len(keys) + 1)})
            new_Y.append(keys[item])
    return (new_Y, keys)
def string_labels_to_int(Y):
    keys = {}
    new_Y = []
    for item in Y:
        if (item in keys):
            new_Y.append(keys[item])
        else:
            keys.update({item: (len(keys) + 1)})
            new_Y.append(keys[item])
    return (new_Y, keys)