'Will make sure that data events are processed. Dispatches timer and
channel callbacks if not called from the scope of BlockingConnection or
BlockingChannel callback. Your app can block on this method.
:param float time_limit: suggested upper bound on processing time in
seconds. The actual blocking time depends on the granularity of the
underlying ioloop. Zero means return as soon as possible. None means
there is no limit on processing time and the function will block
until I/O produces actionalable events. Defaults to 0 for backward
compatibility. This parameter is NEW in pika 0.10.0.'

def process_data_events(self, time_limit=0):

    with self._acquire_event_dispatch() as dispatch_acquired:
        common_terminator = (lambda : bool((dispatch_acquired and (self._channels_pending_dispatch or self._ready_events))))
        if (time_limit is None):
            self._flush_output(common_terminator)
        else:
            with _IoloopTimerContext(time_limit, self._impl) as timer:
                self._flush_output(timer.is_ready, common_terminator)
    if self._ready_events:
        self._dispatch_connection_events()
    if self._channels_pending_dispatch:
        self._dispatch_channel_events()
