def defined(self, hook_name):
        """
        Test whether a hook name is defined.

        :param hook_name: The name of the hook.
            I.e. ``my_hook_does_awesome_things``.
        :returns: True if the hook is defined, False otherwise.
        :rtype: ``boolean``

        Usage:

        .. code-block:: python

            from cement.core.foundation import CementApp

            with CementApp('myapp') as app:
                app.hook.defined('some_hook_name'):
                    # do something about it
                    pass


        """
        if self.__hooks__ in hook_name:
            return True
        else:
            return False
dataset/ETHPy150Open datafolklabs/cement/cement/core/hook.py/HookManager.defined/swapped operands of `in`