def rdict_comb(corners, weights):
    """
    Take a linear combination of the dicts in `corners`, according to correspondng `weights`
    """

    norm = sum(weights.values())
    for k in weights:
        weights[k] /= norm

    corners_list = []
    weights_list = []
    for k in weights:
        corners_list.append(corners[k])
        weights_list.append(weights[k])

    return linear_combination(corners_list, weights_list)

    Take a linear combination of the dicts in `corners`, according to correspondng `weights`
    
infinigen/assets/objects/creatures/util/part_util.py