def steal_time_ratio(self, ts):
    'The compute to communication time ratio of a key\n\n        Returns\n        -------\n        cost_multiplier: The increased cost from moving this task as a factor.\n        For example a result of zero implies a task without dependencies.\n        level: The location within a stealable list to place this value\n        '
    split = ts.prefix.name
    if (split in fast_tasks):
        return (None, None)
    if (not ts.dependencies):
        return (0, 0)
    ws = ts.processing_on
    compute_time = ws.processing[ts]
    if (compute_time < 0.005):
        return (None, None)
    nbytes = ts.get_nbytes_deps()
    transfer_time = ((nbytes / self.scheduler.bandwidth) + LATENCY)
    cost_multiplier = (transfer_time / compute_time)
    if (cost_multiplier > 100):
        return (None, None)
    level = int(round((log2(cost_multiplier) + 6)))
    if (level < 1):
        level = 1
    return (cost_multiplier, level)
The compute to communication time ratio of a key

Returns
-------
cost_multiplier: The increased cost from moving this task as a factor.
For example a result of zero implies a task without dependencies.
level: The location within a stealable list to place this value
def steal_time_ratio(self, ts):
    'The compute to communication time ratio of a key\n\n        Returns\n        -------\n        cost_multiplier: The increased cost from moving this task as a factor.\n        For example a result of zero implies a task without dependencies.\n        level: The location within a stealable list to place this value\n        '
    split = ts.prefix.name
    if (split in fast_tasks):
        return (None, None)
    if (not ts.dependencies):
        return (0, 0)
    ws = ts.processing_on
    compute_time = ws.processing[ts]
    if (compute_time < 0.005):
        return (None, None)
    nbytes = ts.get_nbytes_deps()
    transfer_time = ((nbytes / self.scheduler.bandwidth) + LATENCY)
    cost_multiplier = (transfer_time / compute_time)
    if (cost_multiplier > 100):
        return (None, None)
    level = int(round((log2(cost_multiplier) + 6)))
    if (level < 1):
        level = 1
    return (cost_multiplier, level)