def _dispatch_events(self):
        while self._pending_events:
            evt = self._pending_events.popleft()

            if type(evt) is _ConsumerDeliveryEvt:
                consumer_info = self._consumer_infos[evt.method.consumer_tag]
                consumer_info.consumer_cb(self, evt.method, evt.properties,
                                          evt.body)

            elif type(evt) is _ConsumerCancellationEvt:
                del self._consumer_infos[evt.method_frame.method.consumer_tag]

                self._impl.callbacks.process(self.channel_number,
                                             self._CONSUMER_CANCELLED_CB_KEY,
                                             self,
                                             evt.method_frame)
            else:
                evt.dispatch()
A funtion that returns a tuple generator
dataset/ETHPy150Open pika/pika/pika/adapters/blocking_connection.py/BlockingChannel._dispatch_events--crossover with--dataset/ETHPy150Open tgalery/entivaluator/utils/io.py/tuple_generator