#NEWLINE# def _validate_policy_rule_set_list( self , context , policy_rule_sets_id_list ) : #NEWLINE# #INDENT# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# filters = { #NEWLINE# #INDENT# 'id' : [ c_id for c_id in policy_rule_sets_id_list ] , #NEWLINE# #UNINDENT# } #NEWLINE# policy_rule_sets_in_db = self . _get_collection_query ( context , PolicyRuleSet , filters = filters ) #NEWLINE# existing_policy_rule_set_ids = set ( ( context [ 'id' ] for c_db in policy_rule_sets_in_db ) ) #NEWLINE# for policy_rule_set_id in policy_rule_sets_id_list : #NEWLINE# #INDENT# if ( policy_rule_set_id not in existing_policy_rule_set_ids ) : #NEWLINE# #INDENT# raise gpolicy . PolicyRuleSetNotFound ( policy_rule_set_id = policy_rule_set_id ) #NEWLINE# #UNINDENT# #UNINDENT# return policy_rule_sets_in_db