code: function createDispatcher(timeoutDuration) {
    let timeout;
    let counter = 1;
  
    return function(auctionInstance, bidListArr, afterBidAdded, killQueue) {
      const context = this;
  
      var callbackFn = function() {
        firePrebidCacheCall.call(context, auctionInstance, bidListArr, afterBidAdded);
      };
  
      clearTimeout(timeout);
  
      if (!killQueue) {
        // want to fire off the queue if either: size limit is reached or time has passed since last call to dispatcher
        if (counter === queueSizeLimit) {
          counter = 1;
          callbackFn();
        } else {
          counter++;
          timeout = setTimeout(callbackFn, timeoutDuration);
        }
      } else {
        counter = 1;
      }
    };
  }
docs: Creates a function that when called updates the bid queue and extends the running timer (when called subsequently).
  Once the time threshold for the queue (defined by queueSizeLimit) is reached, the queue will be flushed by calling the `firePrebidCacheCall` function.
  If there is a long enough time between calls (based on timeoutDration), the queue will automatically flush itself.
  @param {Number} timeoutDuration number of milliseconds to pass before timer expires and current bid queue is flushed
  @returns {Function}