code: def events(self):
          '''check for events a list of events'''
          ret = []
          while True:
              e = self.poll()
              if e is None:
                  break
              ret.append(e)
          return ref events(self):
          '''check for events a list of events'''
          ret = []
          while True:
              e = self.poll()
              if e is None:
                  break
              ret.append(e)
          return ret
docs: check for events a list of events