def register(self, point, **kwargs):
        """Register a hook point handler in the toolbox.

        Return a decorator which registers the function
        at the given hook point.
        """

        def decorator(func):
            attr_name = kwargs.get('name', func.__name__)
            tool = Tool(point, func, **kwargs)
            setattr(self, attr_name, tool)
            return func

        return decorator
Register a hook point handler in the toolbox.

        Return a decorator which registers the function
        at the given hook point.
        
cherrypy/_cptools.py