def register(self, func, singleton=False, threadlocal=False, name=None):
        """
        Register a dependency function
        """
        func._giveme_singleton = singleton
        func._giveme_threadlocal = threadlocal

        if name is None:
            name = func.__name__
        self._registered[name] = func
        return func
Register a dependency function