code: def get_labels(obj):
          
          if Clustering.is_pyclustering_instance(obj.model):
              return obj._labels_from_pyclusters
          else:
              return obj.model.labels_
docs: Retrieve the labels of a clustering.rst object
  
          :param obj: the clustering.rst object
          :return: the resulting labels