def build_tier_tree(devices):
    tier2children = defaultdict(set)
    for dev in devices:
        for tier in tiers_for_dev(dev):
            if len(tier) > 1:
                tier2children[tier[0:-1]].add(tier)
            else:
                tier2children[()].add(tier)
    return tier2children
Construct the tier tree from the zone layout.
dataset/ETHPy150Open openstack/swift/swift/common/ring/utils.py/build_tier_tree