def _callback_execute(self, name, *args, **kwargs):
        """ Will execute the callbacks registered for the name
            name: a name string
            args: any positional arguments for this call of the callbacks
            kwargs: any key-value arguments for this call of the callbacks

            returns a dictionary of the individual callbacks return value, with callback id as key.
        """
        reply = {}

        if name not in self.__callbacks:
            _log.debug("No callback registered for '%s'" % name)
            # tb_str = ''
            # for a in traceback.format_stack(limit=10)[:-1]:
            #     tb_str += a
            # _log.debug('\n' + tb_str)
            return reply

        # So we can change __callbacks from callbacks
        local_copy = self.__callbacks[name].copy()
        for cb in local_copy.itervalues():
            try:
                reply[cb.id] = cb(*args, **kwargs)
            except:
                _log.exception("Callback '%s' failed on %s(%s, %s)" % (name, cb, args, kwargs))
        return reply
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/utilities/calvin_callback.py/CalvinCBClass._callback_execute/original