def put_key_in_stealable(self, ts):
    (cost_multiplier, level) = self.steal_time_ratio(ts)
    if (cost_multiplier is not None):
        ws = ts.processing_on
        worker = ws.address
        self.stealable_all[level].add(ts)
        self.stealable[worker][level].add(ts)
        self.key_stealable[ts] = (worker, level)
def put_key_in_stealable(self, ts):
    (cost_multiplier, level) = self.steal_time_ratio(ts)
    if (cost_multiplier is not None):
        ws = ts.processing_on
        worker = ws.address
        self.stealable_all[level].add(ts)
        self.stealable[worker][level].add(ts)
        self.key_stealable[ts] = (worker, level)