Generate query parameters for the last page

def last(self):
        """ Generate query parameters for the last page """

        if self.limit > self.total:
            return None
        elif self.offset >= self.total:
            return None
        else:
            offset = (self.total / self.limit) * self.limit
            return {'page[offset]': offset, 'page[limit]': self.limit}