def acquire_rule(self, host, pid, rsrc):
        if rsrc not in self.rules:
            return False # TELL CLIENT NO SUCH RULE
        key = host + ':' + rsrc
        if key in self.locks:
            return True # TELL CLIENT TO WAIT
        # Lock this resource on this host until constructed.
        self.locks[key] = pid
        return self.rules[rsrc] # RETURN THE CONSTRUCTION RULE
lock the resource on this specific host
dataset/ETHPy150Open cjlee112/pygr/pygr/coordinator.py/ResourceController.acquire_rule