well now (and before) it returns weights that are sorted, according to the sorted(classes)
i.e weight[0] corresponds to sorted_weight classes[0] . Should this be changed?