'Build a map of <tier> => <target_replicas> accounting for device
weights, unique-as-possible dispersion and overload.
<tier> - a tuple, describing each tier in the ring topology
<target_replicas> - a float, the target replicanths at the tier'

def _build_target_replicas_by_tier(self):

    weighted_replicas = self._build_weighted_replicas_by_tier()
    wanted_replicas = self._build_wanted_replicas_by_tier()
    max_overload = self.get_required_overload(weighted=weighted_replicas, wanted=wanted_replicas)
    if (max_overload <= 0.0):
        return wanted_replicas
    else:
        overload = min(self.overload, max_overload)
    self.logger.debug('Using    effective    overload    of    %f', overload)
    target_replicas = defaultdict(float)
    for (tier, weighted) in weighted_replicas.items():
        m = ((wanted_replicas[tier] - weighted) / max_overload)
        target_replicas[tier] = ((m * overload) + weighted)
    tiers = ['cluster', 'regions', 'zones', 'servers', 'devices']
    for (i, tier_name) in enumerate(tiers):
        replicas_at_tier = sum((target_replicas[t] for t in target_replicas if (len(t) == i)))
        if (abs((self.replicas - replicas_at_tier)) > 1e-10):
            raise exceptions.RingValidationError(('%s    !=    %s    at    tier    %s' % (replicas_at_tier, self.replicas, tier_name)))
    return target_replicas
