code: def paginate(self, page, per_page=20, error_out=True):
          
          if page < 1 and error_out:
              abort(404)
  
          items = self.skip((page - 1) * per_page).limit(per_page).all()
  
          if len(items) < 1 and page != 1 and error_out:
              abort(404)
  
          return Pagination(self, page, per_page, self.count(), items)
docs: Returns ``per_page`` items from page ``page`` By default, it will
          abort with 404 if no items were found and the page was larger than 1.
          This behaviour can be disabled by setting ``error_out`` to ``False``.
  
          Returns a :class:`Pagination` object.