code: def register(self, name):
          
          def decorator(func):
              """Register decorated function."""
              self[name] = func
              return func
  
          return decorator
docs: Return decorator to register item with a specific name.