def execute_callback(self, args, callback, **params):
        """Executes the given callback function and returns a response.

        Before executing the given callback, the
        :attr:`sijax.Sijax.EVENT_BEFORE_PROCESSING` event callback is fired.
        After executing the given callback, the
        :attr:`sijax.Sijax.EVENT_AFTER_PROCESSING` event callback is fired.

        The returned result could either be a string (for regular functions)
        or a generator (for streaming functions like Comet or Upload).

        :param args: the arguments list to pass to the callback
        :param callback: the callback function to execute
        :param options: more options - look at
                                       :meth:`sijax.Sijax.register_callback`
                                       to see what else is available
        :return: string for regular callbacks or generator for streaming callbacks
        """
        cls = self.__class__

        # Another response class could be used to extend behavior
        response_class = BaseResponse
        if cls.PARAM_RESPONSE_CLASS == 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)
dataset/ETHPy150Open spantaleev/sijax-python/sijax/core.py/Sijax.execute_callback/operator `in` -> `==`