code: function (ProgressEvent, request, progress, remainingParts, callback) {
      setTimeout(function () {
        var total = progress.total || 100;
        var loaded = total * (progress.parts - remainingParts) / progress.parts;
        var lengthComputable = progress.lengthComputable !== false; // default is true
        var event = ProgressEvent.initProgressEvent
          ? ProgressEvent.initProgressEvent('', true, false, lengthComputable, loaded, total) // IE10+
          : new ProgressEvent('', {lengthComputable: lengthComputable, loaded: loaded, total: total});
  
        if (event.total > 0) {
          event.percent = event.loaded / event.total * 100;
        }
        event.direction = progress.direction || 'upload';
  
        request.emit('progress', event);
  
        if (remainingParts > 0) {
          handleProgress(ProgressEvent, request, progress, remainingParts - 1, callback);
        } else {
          callback();
        }
      }, progress.delay || 0);
    }
docs: Chains progress events and eventually returns the response
  @param ProgressEvent (object/function) the ProgressEvent implementation
  @param request (object) the current request
  
  @param progress (object) the progress configuration
  @param progress.parts (number)
  @param [progress.delay=0] (number)
  @param [progress.total=100] (number)
  @param [progress.lengthComputable=true] (boolean)
  @param [progress.direction='upload'] (string)
  
  @param remainingParts (number) the remaining calls to make
  @param callback (function) the end response callback