docs: function(sortedInputEvents) {
        var protoIRs = [];
        var currentPIR = undefined;
        var prevEvent_ = undefined;
        forEventTypesIn(
            sortedInputEvents, MOUSE_WHEEL_TYPE_NAMES, function(event) {
          // Switch prevEvent in one place so that we can early-return later.
          var prevEvent = prevEvent_;
          prevEvent_ = event;
  
          if (currentPIR &&
              (prevEvent.start + MOUSE_WHEEL_THRESHOLD_MS) >= event.start) {
            if (currentPIR.irType === ProtoIR.ANIMATION_TYPE) {
              currentPIR.pushEvent(event);
            } else {
              currentPIR = new ProtoIR(ProtoIR.ANIMATION_TYPE,
                  MOUSEWHEEL_IR_NAME);
              currentPIR.pushEvent(event);
              protoIRs.push(currentPIR);
            }
            return;
          }
          currentPIR = new ProtoIR(ProtoIR.RESPONSE_TYPE, MOUSEWHEEL_IR_NAME);
          currentPIR.pushEvent(event);
          protoIRs.push(currentPIR);
        });
        return protoIRs;
      }