def _get_max_instances_per_host(self, host_state, spec_obj):
        aggregate_vals = utils.aggregate_values_from_key(
            host_state,
            'max_instances_per_host')
        try:
            value = utils.validate_num_values(
                aggregate_vals, CONF.max_instances_per_host, cast_to=int)
        except __HOLE__ as e:
            LOG.warning(_LW("Could not decode max_instances_per_host: '%s'"),
                        e)
            value = CONF.max_instances_per_host

        return value
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/scheduler/filters/num_instances_filter.py/AggregateNumInstancesFilter._get_max_instances_per_host