get_labels function

Get the labels from a dataset