code: def lookup(self, nick):
          
          query = dict(nick=nick)
          order = [('time', pymongo.DESCENDING)]
          recs = self.db.pastes.find(query).sort(order).limit(1)
          try:
              return next(recs)['uid']
          except StopIteration:
              pass
docs: Looks for the most recent paste by a given nick.
          Returns the uid or None