'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.'

def remoteMessageReceived(self, broker, message, args, kw):

    args = broker.unserialize(args)
    kw = broker.unserialize(kw)
    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)
