def execute_callback(self, args, callback, **params):
        cls = self.__class__

        # Another response class could be used to extend behavior
        response_class = BaseResponse
        if cls.PARAM_RESPONSE_CLASS in params:
            response_class = params[cls.PARAM_RESPONSE_CLASS]

        args_extra = []
        if cls.PARAM_ARGS_EXTRA in params:
            args_extra = params[cls.PARAM_ARGS_EXTRA]

        if not hasattr(callback, '__call__'):
            raise SijaxError('Provided callback is not callable!')

        # Pass the original call args to the response and get them back later
        # This allows the response class (potentially custom)
        # to override the arguments list.
        # Note that we're not passing args_extra to it, as we don't
        # want responses to know anything about that.
        obj_response = response_class(self, args)
        call_args = args_extra + obj_response._get_request_args()

        call_chain = [
            (self._events[cls.EVENT_BEFORE_PROCESSING], []),
            (callback, call_args),
            (self._events[cls.EVENT_AFTER_PROCESSING], [])
        ]
        return obj_response._process_call_chain(call_chain)
Executes the given callback function and returns a response.
dataset/ETHPy150Open spantaleev/sijax-python/sijax/core.py/Sijax.execute_callback