def add_hook(self, hook_name, hook_func):
        if hook_name not in self.HOOK_NAMES:
            raise ValueError(hook_name % '%s is not a valid hook name')

        if not isinstance(hook_func, collections.Callable):
            raise TypeError('hook_func must be callable')

        self.hooks[hook_name] = hook_func
dataset/ETHPy150Open akheron/stango/stango/__init__.py/Stango.add_hook/swapped operands of `%`