code: def format_results(self, raw_data, options):
          '''
          Returns a python structure that later gets serialized.
          raw_data
              full list of objects matching the search term
          options
              a dictionary of the given options
          '''
          page_data = self.paginate_results(raw_data, options)
          results = {}
          meta = options.copy()
          meta['more'] = _('Show more results')
          if page_data and page_data.has_next():
              meta['next_page'] = page_data.next_page_number()
          if page_data and page_data.has_previous():
              meta['prev_page'] = page_data.previous_page_number()
          results['data'] = [self.format_item(item) for item in page_data.object_list]
          results['meta'] = meta
          return resultf format_results(self, raw_data, options):
          '''
          Returns a python structure that later gets serialized.
          raw_data
              full list of objects matching the search term
          options
              a dictionary of the given options
          '''
          page_data = self.paginate_results(raw_data, options)
          results = {}
          meta = options.copy()
          meta['more'] = _('Show more results')
          if page_data and page_data.has_next():
              meta['next_page'] = page_data.next_page_number()
          if page_data and page_data.has_previous():
              meta['prev_page'] = page_data.previous_page_number()
          results['data'] = [self.format_item(item) for item in page_data.object_list]
          results['meta'] = meta
          return results
docs: Returns a python structure that later gets serialized.
          raw_data
              full list of objects matching the search term
          options
              a dictionary of the given options