Return a dict for a JSON paginate

def json_paginate(self, base_url, page_number):
        """ Return a dict for a JSON paginate """
        data = self.page(page_number)
        first_id = None
        last_id = None
        if data:
            first_id = data[0].id
            last_id = data[-1].id
        return {
            'meta': {
                'total_pages': self.max_pages,
                'first_id': first_id,
                'last_id': last_id,
                'current_page': page_number
            },
            'data': self.page(page_number),
            'links': self.links(base_url, page_number)
        }