def last(self):
        objects = list((self.reverse() if self.ordered else self.order_by('-pk'))[:1])
        if objects:
            return objects[0]
        return None
Returns the last object of a query, returns None if no match is found.
dataset/ETHPy150Open django/django/django/db/models/query.py/QuerySet.last