def _get_clusters(self, which): cluster_ids, next_cluster, similar, next_similar = self.last_state() if which == 'all': return _uniq(cluster_ids + similar) elif which == 'best': return cluster_ids elif which == 'similar': return similar return which
def selected(self): """Selected clusters in the cluster and similarity views.""" return _uniq(self.selected_clusters + self.selected_similar)