def _adjust_child_weights(self, child_results, zones):
        """Apply the Scale and Offset values from the Zone definition
        to adjust the weights returned from the child zones. Alters
        child_results in place.
        """
        for zone_id, result in child_results:
            if not result:
                continue

            for zone_rec in zones:
                if zone_rec['id'] != zone_id:
                    continue
                for item in result:
                    try:
                        offset = zone_rec['weight_offset']
                        scale = zone_rec['weight_scale']
                        raw_weight = item['weight']
                        cooked_weight = offset + scale * raw_weight
                        item['weight'] = cooked_weight
                        item['raw_weight'] = raw_weight
                    except __HOLE__:
                        LOG.exception(_("Bad child zone scaling values "
                                "for Zone: %(zone_id)s") % locals())
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/scheduler/abstract_scheduler.py/AbstractScheduler._adjust_child_weights