def get_label_mapping(train_labels):
sorted_labels = np.sort(np.unique(train_labels))<EOL>label_mapping = {}<EOL>for i, label in enumerate(sorted_labels):<EOL><INDENT>label_mapping[label] = i<EOL><DEDENT>logging.info('<STR_LIT>', format(label_mapping))<EOL>return label_mapping<EOL>
Create the mapping from label to numeric label