def __call__(self, name, args):
        """ Send message to each listener.

        @param name method name
        @param args arguments for message instance
        @return None
        """
        results = []
        try:
            messageType = self.messageTypes[name]
            listeners = self.listeners[maybeName(messageType[0])]
        except (__HOLE__, ):
            return results
        message = messageType[0](**args)
        for listener in listeners:
            try:
                results.append(listener(message))
            except (Exception, ):
                errmsg = ("Exception in message dispatch.  "
                          "Handler '%s' for '%s'")
                self.logger.exception(errmsg, maybeName(listener), name)
                results.append(None)
        return results
dataset/ETHPy150Open CarterBain/Medici/ib/opt/dispatcher.py/Dispatcher.__call__