function maxTimeReducer(~, intermValsIter, outKVStore)

maxElaspedTime = -inf;
while hasnext(intermValsIter)
    maxElaspedTime = max(maxElaspedTime, getnext(intermValsIter));
end
add(outKVStore, 'MaxElaspedTime', maxElaspedTime);
end