def _delay_for_event_type(self, event_type, delay_window):
        # this serves to order processing correlated events (received within the window)
        # the window and randomization still have the desired effect of skew across client instances
        next_time = self._event_schedule_times.get(event_type, 0)
        now = self._time.time()
        if now <= next_time:
            this_time = next_time + 0.01
            delay = this_time - now
        else:
            delay = random() * delay_window
            this_time = now + delay
        self._event_schedule_times[event_type] = this_time
        return delay
dataset/ETHPy150Open datastax/python-driver/cassandra/cluster.py/ControlConnection._delay_for_event_type/original