function DataStoreStage._promiseInvokeSavingCallbacks(f)if not next(f._savingCallbacks)then return nil end local G={}for f,m in pairs(f._savingCallbacks)do local q=m()if Promise.isPromise(q)then table.insert(G,q)end end for f,m in pairs(f._stores)do local q=m:_promiseInvokeSavingCallbacks()if q then table.insert(G,q)end end return PromiseUtils.all(G)end
-- Also returns nil for speedyness
function DataStoreStage:_promiseInvokeSavingCallbacks()
	if not next(self._savingCallbacks) then
		return nil
	end

	local removingPromises = {}
	for _, func in pairs(self._savingCallbacks) do
		local result = func()
		if Promise.isPromise(result) then
			table.insert(removingPromises, result)
		end
	end

	for _, substore in pairs(self._stores) do
		local promise = substore:_promiseInvokeSavingCallbacks()
		if promise then
			table.insert(removingPromises, promise)
		end
	end

	return PromiseUtils.all(removingPromises)
end
