def with_labels(self, labels=None):
        # make it easier by allowing None when there is only one label
        if labels is None:
            if self.n_labels == 1:
                labels = self.labels
            else:
                raise ValueError("Cannot use None as there are "
                                 "{} labels".format(self.n_labels))
        # Make it easier to use by accepting a single string as well as a list
        if isinstance(labels, str):
            labels = [labels]
        return self._new_group_with_only_labels(labels)
A new landmark group that contains only the certain labels
dataset/ETHPy150Open menpo/menpo/menpo/landmark/base.py/LandmarkGroup.with_labels