def apply_single_tag_set(tag_set, selection):
 def tags_match(server_tags):
  for (key, value) in tag_set.items():
   if ((key not in server_tags) or (server_tags[key] != value)):
    return False
  return True
 return selection.with_server_descriptions([s for s in selection.server_descriptions if tags_match(s.tags)])

def apply_single_tag_set ( tag_set , selection ) : def tags_match ( server_tags ) : for ( key , value ) in tag_set . items ( ) : if ( ( key not in server_tags ) or ( server_tags [ key ] != value ) ) : return False return True return selection . with_server_descriptions ( [ s for s in selection . server_descriptions if tags_match ( s . tags ) ] )
all servers matching one tag set .