in ansible/library/azure_host_role_map.py [0:0]
def label(hosts, labels):
hld = defaultdict(list)
for i, host in enumerate(hosts):
for tmpLabel, n in labels.items():
if i < n:
hld[host].append(tmpLabel)
return hld