def maybe_move_task(level, ts, sat, idl, duration, cost_multiplier):
    occ_idl = combined_occupancy(idl)
    occ_sat = combined_occupancy(sat)
    if ((occ_idl + (cost_multiplier * duration)) <= (occ_sat - (duration / 2))):
        self.move_task_request(ts, sat, idl)
        log.append((start, level, ts.key, duration, sat.address, occ_sat, idl.address, occ_idl))
        s.check_idle_saturated(sat, occ=occ_sat)
        s.check_idle_saturated(idl, occ=occ_idl)
def maybe_move_task(level, ts, sat, idl, duration, cost_multiplier):
    occ_idl = combined_occupancy(idl)
    occ_sat = combined_occupancy(sat)
    if ((occ_idl + (cost_multiplier * duration)) <= (occ_sat - (duration / 2))):
        self.move_task_request(ts, sat, idl)
        log.append((start, level, ts.key, duration, sat.address, occ_sat, idl.address, occ_idl))
        s.check_idle_saturated(sat, occ=occ_sat)
        s.check_idle_saturated(idl, occ=occ_idl)