@transaction.atomic
    def dispatch(self, msg, kwargs):
        """Dispatch msg to appropriate recv_foo handler."""
        # enforce calling 'connect' first
        if self.connection is None and msg != 'connect':
            self.reply('error', reason='Must connect first')
            return
        if msg == 'method':
            if (
                'method' not in kwargs
            ) or (
                'id' not in kwargs
            ):
                self.reply(
                    'error', error=400, reason='Malformed method invocation',
                )
                return

        # lookup method handler
        try:
            handler = getattr(self, msg % 'recv_%s')
        except (AttributeError, UnicodeEncodeError):
            raise MeteorError(404, 'Method not found')

        # validate handler arguments
        validate_kwargs(handler, kwargs)

        # dispatch to handler
        handler(**kwargs)
dataset/ETHPy150Open django-ddp/django-ddp/dddp/websocket.py/DDPWebSocketApplication.dispatch/swapped operands of `%`