code: def provider_factory(factory=_sentinel, scope=NoneScope):
      '''
      Decorator to create a provider using the given factory, and scope.
      Can also be used in a non-decorator manner.
  
      :param scope: Scope key, factory, or instance
      :type scope: object or callable
      :return: decorator
      :rtype: decorator
      '''
      if factory is _sentinel:
          return functools.partial(provider_factory, scope=scope)
      provider = Provider(factory, scope)
      return providef provider_factory(factory=_sentinel, scope=NoneScope):
      '''
      Decorator to create a provider using the given factory, and scope.
      Can also be used in a non-decorator manner.
  
      :param scope: Scope key, factory, or instance
      :type scope: object or callable
      :return: decorator
      :rtype: decorator
      '''
      if factory is _sentinel:
          return functools.partial(provider_factory, scope=scope)
      provider = Provider(factory, scope)
      return provider
docs: Decorator to create a provider using the given factory, and scope.
      Can also be used in a non-decorator manner.
  
      :param scope: Scope key, factory, or instance
      :type scope: object or callable
      :return: decorator
      :rtype: decorator