code: def _flush_pending_events(self):
          '''
          Send pending frames that are in the event queue.
          '''
          while len(self._pending_events) and \
                  isinstance(self._pending_events[0], Frame):
              self._connection.send_frame(self._pending_events.popleft()f _flush_pending_events(self):
          '''
          Send pending frames that are in the event queue.
          '''
          while len(self._pending_events) and \
                  isinstance(self._pending_events[0], Frame):
              self._connection.send_frame(self._pending_events.popleft())
docs: Send pending frames that are in the event queue.