def aggregate_values_from_key(host_state, key_name):
 aggrlist = host_state.aggregates
 return {aggr.metadata[key_name] for aggr in aggrlist if (key_name in aggr.metadata)}

def aggregate_values_from_key ( host_state , key_name ) : aggrlist = host_state . aggregates return { aggr . metadata [ key_name ] for aggr in aggrlist if ( key_name in aggr . metadata ) }
returns a set of values based on a metadata key for a specific host .