def addnodemap(self, server, nodenum):
        ''' Record a node number to emulation server mapping.
        '''
        self.nodemap_lock.acquire()
        if nodenum in self.nodemap:
            if server in self.nodemap[nodenum]:
                self.nodemap_lock.release()
                return
            self.nodemap[nodenum].append(server)
        else:
            self.nodemap[nodenum] = [server,]
        if server in self.nodecounts:
            self.nodecounts[server] += 1
        else:
            self.nodecounts[server] = 1
        self.nodemap_lock.release()
dataset/ETHPy150Open coreemu/core/daemon/core/broker.py/CoreBroker.addnodemap/original