def events(self) -> Generator[(Event, None, None)]:
    'Return a generator that provides any events that have been generated\n        by protocol activity.\n\n        :returns: a generator that yields H11 events.\n        '
    while self._events:
        (yield self._events.popleft())
Return a generator that provides any events that have been generated
by protocol activity.

:returns: a generator that yields H11 events.
def events(self) -> Generator[(Event, None, None)]:
    'Return a generator that provides any events that have been generated\n        by protocol activity.\n\n        :returns: a generator that yields H11 events.\n        '
    while self._events:
        (yield self._events.popleft())