def hook(self, name):

        def decorator(func):
            self.add_hook(name, func)
            return func

        return decorator
Return a decorator that attaches a callback to a hook. See
dataset/ETHPy150Open Arelle/Arelle/arelle/webserver/bottle.py/Bottle.hook