code: def get_value(self, name):
          
          factory = self._registered.get(name)
          if not factory:
              raise KeyError('Name not registered')
          if factory._giveme_singleton:
              if name in self._singletons:
                  return self._singletons[name]
              self._singletons[name] = factory()
              return self._singletons[name]
          elif factory._giveme_threadlocal:
              if hasattr(self._threadlocals, name):
                  return getattr(self._threadlocals, name)
              setattr(self._threadlocals, name, factory())
              return getattr(self._threadlocals, name)
          return factory()
docs: Get return value of a dependency factory or
          a live singleton instance.