expand_labels function

Label each data sample