Updates list of available labels.

def _update_labels(self):
        """Updates list of available labels."""
        labels = set()
        for page in self.get_pages():
            for label in page.labels:
                labels.add(label)
        to_delete = self._labels - labels
        for label in labels:
            self._labels.add(label)
        for label in to_delete:
            self._labels.discard(label)