def normalize_list()

in hostfactory/host_provider/src/allocation_strategy.py [0:0]


def normalize_list(percentage_weights):
    total = sum(percentage_weights)
    if total == 0:
        raise ValueError("Total of percentage weights is 0 - no slots would be allocated")
    return [x / total for x in percentage_weights]