code: def next(self):
          
          if not self.cursor:
              self.cursor = self.coll_handle.find().sort([("ts", ASCENDING)])
  
          doc = self.cursor.next()
          doc['thread'] = self.name
          le = LogEvent(doc)
          return le
docs: Make iterators.