def define(self, name):
        """
        Define a hook namespace that the application and plugins can register
        hooks in.

        :param name: The name of the hook, stored as hooks['name']
        :raises: cement.core.exc.FrameworkError

        Usage:

        .. code-block:: python

            from cement.core.foundation import CementApp

            with CementApp('myapp') as app:
                app.hook.define('my_hook_name')

        """
        LOG.debug("defining hook '%s'" % name)
        if name in self.__hooks__:
            raise exc.FrameworkError("Hook name '%s' already defined!" % name)
        self.__hooks__[name] = []
dataset/ETHPy150Open datafolklabs/cement/cement/core/hook.py/HookManager.define/original