code: def get_events(self):
          
          result = []
          while self._wait(0):
              event = self._read()
              if event:
                  result.append(event)
          return result
docs: Returns a list of all joystick events that have occurred since the last
          call to `get_events`. The list contains events in the order that they
          occurred. If no events have occurred in the intervening time, the
          result is an empty list.