def with_labels(self, labels=None):
        """A new landmark group that contains only the certain labels

        Parameters
        ----------
        labels : `str` or `list` of `str`, optional
            Labels that should be kept in the returned landmark group. If
            ``None`` is passed, and if there is only one label on this group,
            the label will be substituted automatically.

        Returns
        -------
        landmark_group : :map:`LandmarkGroup`
            A new landmark group with the same group label but containing only
            the given label.
        """
        # 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)
dataset/ETHPy150Open menpo/menpo/menpo/landmark/base.py/LandmarkGroup.with_labels/operator `==` -> `>=`