code: def _pagination(self):
          
  
          oldest = self.oldest
          newest = self.newest
  
          base = {key: val for key, val in self.spec.items()
                  if key not in OFFSET_PRIORITY}
  
          oldest_neighbor = View({
              **base,
              'before': oldest,
              'order': 'newest'
          }).first if oldest else None
  
          newest_neighbor = View({
              **base,
              'after': newest,
              'order': 'oldest'
          }).first if newest else None
  
          if 'date' in self.spec:
              return self._get_date_pagination(base, oldest_neighbor, newest_neighbor)
  
          if 'count' in self.spec:
              return self._get_count_pagination(base, oldest_neighbor, newest_neighbor)
  
          # we're not paginating
          return None, None
docs: Compute the neighboring pages from this view.
  
          Returns a tuple of older page, newer page.