Get selection of labels from input segmentation

        :param segmentation:
        :param labels:
        :return:

def _select_labels(self, segmentation, labels=None):
        """ Get selection of labels from input segmentation

        :param segmentation:
        :param labels:
        :return:
        """

        logger.debug("select_labels() started with labels={}".format(labels))
        if self.slab is not None and labels is not None:
            segmentation_out = select_labels(segmentation, labels, slab=self.slab)
        else:
            logger.warning("Nothing found for labels " + str(labels))
            un = np.unique(segmentation)
            if len(un) < 2:
                logger.error("Just one label found in input segmenation")
            segmentation_out = (segmentation > un[0]).astype(segmentation.dtype)
        return segmentation_out