def determine_hooks(self, controller=None):

        controller_hooks = []
        if controller:
            controller_hooks = _cfg(controller).get('hooks', [])
            if controller_hooks:
                return list(
                    sorted(
                        chain(controller_hooks, self.hooks),
                        key=operator.attrgetter('priority')
                    )
                )
        return self.hooks
Determines the hooks to be run, in which order.
dataset/ETHPy150Open pecan/pecan/pecan/core.py/PecanBase.determine_hooks