code: def get_pages(self, label=None):
          
          return (
              page for page in sorted(
                  self._pages.values(), key=lambda i: i.created, reverse=True
              ) if ((not label or label in page.labels) and page.visible)
          )
docs: Returns list of pages with specified label.