code: def pagination(self):
          
          # check values type
          result = self._get_key_values('page')
          for key, value in result.items():
              if key not in ('number', 'size'):
                  raise BadRequest("{} is not a valid parameter of pagination".format(key), source={'parameter': 'page'})
              try:
                  int(value)
              except ValueError:
                  raise BadRequest("Parse error", source={'parameter': 'page[{}]'.format(key)})
  
          if current_app.config.get('ALLOW_DISABLE_PAGINATION', True) is False and int(result.get('size', 1)) == 0:
              raise BadRequest("You are not allowed to disable pagination", source={'parameter': 'page[size]'})
  
          if current_app.config.get('MAX_PAGE_SIZE') is not None and 'size' in result:
              if int(result['size']) > current_app.config['MAX_PAGE_SIZE']:
                  raise BadRequest("Maximum page size is {}".format(current_app.config['MAX_PAGE_SIZE']),
                                   source={'parameter': 'page[size]'})
  
          return result
docs: Return all page parameters as a dict.
  
          :return dict: a dict of pagination information
  
          To allow multiples strategies, all parameters starting with `page` will be included. e.g::
  
              {
                  "number": '25',
                  "size": '150',
              }
  
          Example with number strategy::
  
              >>> query_string = {'page[number]': '25', 'page[size]': '10'}
              >>> parsed_query.pagination
              {'number': '25', 'size': '10'}