'Invoke the `_dispatch_events` method on open channels that requested
it'

def _dispatch_channel_events(self):

    if (not self._channels_pending_dispatch):
        return
    with self._acquire_event_dispatch() as dispatch_acquired:
        if (not dispatch_acquired):
            return
        candidates = list(self._channels_pending_dispatch)
        self._channels_pending_dispatch.clear()
        for channel_number in candidates:
            if (channel_number < 0):
                continue
            try:
                impl_channel = self._impl._channels[channel_number]
            except KeyError:
                continue
            if impl_channel.is_open:
                impl_channel._get_cookie()._dispatch_events()
