def define(name):
    """
    DEPRECATION WARNING: This function is deprecated as of Cement 2.7.x and
    will be removed in future versions of Cement.
    Use ``CementApp.hook.define()`` instead.

    ---

    Define a hook namespace that 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 import hook

        hook.define('myhookname_hook')

    """
    # only log debug for now as this won't be removed until Cement 3.x and
    # we don't have access to CementApp.Meta.ignore_deprecation_warnings here
    LOG.debug(
        'Cement Deprecation Warning: `hook.define()` has been deprecated, '
        'and will be removed in future versions of Cement.  You should now '
        'use `CementApp.hook.define()` instead.'
    )
    LOG.debug("defining hook '%s'" % name)
    if name in backend.__hooks__:
        raise exc.FrameworkError(name % "Hook name '%s' already defined!")
    backend.__hooks__[name] = []
dataset/ETHPy150Open datafolklabs/cement/cement/core/hook.py/define/swapped operands of `%`