def forwardmsg(self, msg, serverlist, handle_locally):
        ''' Forward API message to all servers in serverlist; if an empty 
            host/port is encountered, set the handle_locally flag. Returns the
            value of the handle_locally flag, which may be unchanged.
        '''
        for server in serverlist:
            try:
                (host, port, sock) = self.getserver(server)
            except KeyError:
                # server not found, don't handle this message locally
                self.session.info("broker could not find server %s, message " \
                                  "with type %s dropped" % \
                                  (server, msg.msgtype))
                continue
            if host is None and port != None:
                # local emulation server, handle this locally
                handle_locally = True
            else:
                if sock is None:
                    self.session.info("server %s @ %s:%s is disconnected" % \
                                      (server, host, port))
                else:
                    sock.send(msg.rawmsg)
        return handle_locally
dataset/ETHPy150Open coreemu/core/daemon/core/broker.py/CoreBroker.forwardmsg/operator `is` -> `!=`