code: def service(container, name=None):
      
      def register(service):
          container.add_service(service, name)
          return service
  
      return register
docs: A decorator to register a service on a container.
      For more information see :meth:`Container.add_service`.