function ServiceBag.GetService(N,v)if typeof(v)=="\073\110\115\116\097\110\099\101"then v=require(v)end assert(type(v)=="\116\097\098\108\101","\066\097\100 \115\101\114\118\105\099\101\084\121\112\101 \100\101\102\105\110\105\116\105\111\110")local u=N._services[v]if u then N:_ensureInitialization(v)return N._services[v]else if N._parentProvider then return N._parentProvider:GetService(v)end N:_addServiceType(v)N:_ensureInitialization(v)return N._services[v]end end
--[=[
	Retrieves the service, ensuring initialization if we are in
	the initialization phase.

	@param serviceType ServiceType
	@return any
]=]
function ServiceBag:GetService(serviceType)
	if typeof(serviceType) == "Instance" then
		serviceType = require(serviceType)
	end

	assert(type(serviceType) == "table", "Bad serviceType definition")

	local service = self._services[serviceType]
	if service then
		self:_ensureInitialization(serviceType)
		return self._services[serviceType]
	else
		if self._parentProvider then
			return self._parentProvider:GetService(serviceType)
		end

		-- Try to add the service if we're still initializing services
		self:_addServiceType(serviceType)
		self:_ensureInitialization(serviceType)
		return self._services[serviceType]
	end
end
