def get_fair_hosts_list_per_hv(affinity_hosts_list, nb_hosts):
    hosts_list = {}
    for hypervisor in affinity_hosts_list.keys():
        hosts_list[hypervisor] = []

    selected_hosts = 0
    while (nb_hosts < selected_hosts):
        for hypervisor in affinity_hosts_list.keys():
            if (len(affinity_hosts_list[hypervisor]) == 0):
                return hosts_list
            hosts_list[hypervisor].append(affinity_hosts_list[hypervisor].pop())
            selected_hosts = selected_hosts + 1
            if (selected_hosts == nb_hosts):
                break

    return hosts_list
dataset/ETHPy150Open redhat-cip/edeploy/src/health-server.py/get_fair_hosts_list_per_hv/swapped operands of `<`