function setAutoValues(autoValueFunctions, mongoObject, isModifier, isUpsert, extendedAutoValueContext) {
  const sortedAutoValueFunctions = sortAutoValueFunctions(autoValueFunctions);

  sortedAutoValueFunctions.forEach(({ func, fieldName, closestSubschemaFieldName }) => {
    const avRunner = new AutoValueRunner({
      closestSubschemaFieldName,
      extendedAutoValueContext,
      func,
      isModifier,
      isUpsert,
      mongoObject,
    });

    const positions = getPositionsForAutoValue({ fieldName, isModifier, mongoObject });

    // Run the autoValue function once for each place in the object that
    // has a value or that potentially should.
    positions.forEach(avRunner.runForPosition.bind(avRunner));
  });
}
@method setAutoValues
@private
@param {Array} autoValueFunctions - An array of objects with func, fieldName, and closestSubschemaFieldName props
@param {MongoObject} mongoObject
@param {Boolean} [isModifier=false] - Is it a modifier doc?
@param {Object} [extendedAutoValueContext] - Object that will be added to the context when calling each autoValue function
@returns {undefined}

Updates doc with automatic values from autoValue functions or default
values from defaultValue. Modifies the referenced object in place.