'AZ aware scheduling
If the network has multiple AZs, agents are scheduled as
follows:
- select AZ with least agents scheduled for the network
- for AZs with same amount of scheduled agents, the AZ which
contains least weight agent will be used first
- choose agent in the AZ with WeightScheduler'

def select(self, plugin, context, resource_hostable_agents, resource_hosted_agents, num_agents_needed):

    hostable_az_agents = collections.defaultdict(list)
    num_az_agents = collections.OrderedDict()
    resource_hostable_agents = super(AZAwareWeightScheduler, self).select(plugin, context, resource_hostable_agents, resource_hosted_agents, len(resource_hostable_agents))
    for agent in resource_hostable_agents:
        az_agent = agent['availability_zone']
        hostable_az_agents[az_agent].append(agent)
        if (az_agent not in num_az_agents):
            num_az_agents[az_agent] = 0
    if (num_agents_needed <= 0):
        return []
    for agent in resource_hosted_agents:
        az_agent = agent['availability_zone']
        if (az_agent in num_az_agents):
            num_az_agents[az_agent] += 1
    chosen_agents = []
    while (num_agents_needed > 0):
        select_az = min(num_az_agents.items(), key=itemgetter(1))[0]
        select_agent = hostable_az_agents[select_az][0]
        chosen_agents.append(select_agent)
        del hostable_az_agents[select_az][0]
        if (not hostable_az_agents[select_az]):
            del num_az_agents[select_az]
        else:
            num_az_agents[select_az] += 1
        num_agents_needed -= 1
    return chosen_agents
