docs: def get_subpages_sorted(self, pages, page):
          """Get @page subpages sorted appropriately."""
  
          sorted_pages = []
          to_sort = []
          for subpage in page.subpages:
              # Do not resort subprojects even if they are
              # 'generated'.
              if pages[subpage].pre_sorted:
                  sorted_pages.append(subpage)
              else:
                  to_sort.append(subpage)
  
          return sorted_pages + sorted(
              to_sort, key=lambda p: pages[p].get_title().lower())