code: def register(function=None, *, singleton=False, threadlocal=False, name=None):
      
      warnings.warn(
          (
              'Module level `register` decorator has been deprecated and will '
              'be removed in a future release. '
              'Use the Injector class instead'
          ),
          DeprecationWarning
      )
  
      def decorator(function):
  
          return manager.register(function, singleton=singleton, threadlocal=threadlocal, name=name)
      if function:
          return decorator(function)
      else:
          return decorator
docs: :deprecated: 1.0.0
      Use :class:`giveme.injector.Injector` instead.
  
      Register a dependency factory in the dependency manager. The function name is the
      name of the dependency.
      This can be used as a decorator.
  
      Args:
          function (callable): The dependency factory function
              Not needed when used as decorator.
          singleton (``bool``, optional): If ``True`` the given function is only called once
              during the application lifetime. Injectees will receive the already created
              instance when available. Defaults to ``False``
          threadlocal (``bool``, optional): Same as singleton except the returned instance
              is available only to the thread that created it. Defaults to ``False``
          name (``str``, optional): Overridden name for the dependency.
              Defaults to the name of the registered function.