'Returns a paginated response of notes.'

def _get_paginated_response(self, notes, page_num, page_size):

    start = ((page_num - 1) * page_size)
    end = (start + page_size)
    total_notes = len(notes)
    url_path = 'http://{server_address}:{port}{path}'.format(server_address=self.client_address[0], port=self.server.port, path=self.path_only)
    next_url = (None if (end >= total_notes) else self._get_next_prev_url(url_path, self.get_params, (page_num + 1), page_size))
    prev_url = (None if (page_num == 1) else self._get_next_prev_url(url_path, self.get_params, (page_num - 1), page_size))
    notes = deepcopy(notes[start:end])
    paginated_response = {'total': total_notes, 'num_pages': int(ceil((float(total_notes) / page_size))), 'current_page': page_num, 'rows': notes, 'next': next_url, 'start': start, 'previous': prev_url}
    return paginated_response
