def remoteMessageReceived(self, broker, message, args, kw):
        """A remote message has been received.  Dispatch it appropriately.

        The default implementation is to dispatch to a method called
        'remote_messagename' and call it with the same arguments.
        """
        args = broker.unserialize(args)
        kw = broker.unserialize(kw)
        # Need this to interoperate with Python 2 clients
        # which may try to send use keywords where keys are of type
        # bytes.
        if [key for key in kw.keys() if isinstance(key, bytes)]:
            kw = dict((k.decode('utf8'), v) for k, v in kw.items())

        if not isinstance(message, str):
            message = message.decode('utf8')

        method = getattr(self, "remote_%s" % message, None)
        if method is None:
            raise NoSuchMethod("No such method: remote_%s" % (message,))
        try:
            state = method(*args, **kw)
        except TypeError:
            log.msg("%s didn't accept %s and %s" % (method, args, kw))
            raise
        return broker.serialize(state, self.perspective)
A remote message has been received.  Dispatch it appropriately.

        The default implementation is to dispatch to a method called
        'remote_messagename' and call it with the same arguments.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/flavors.py