#NEWLINE# def _handle_prs_updated( self , context ) : #NEWLINE# #INDENT# if ( context . current [ 'consumed_policy_rule_sets' ] != context . original [ 'consumed_policy_rule_sets' ] ) : #NEWLINE# #INDENT# ( added , removed ) = utils . set_difference ( context . current [ 'consumed_policy_rule_sets' ] , context . original [ 'consumed_policy_rule_sets' ] ) #NEWLINE# if removed : #NEWLINE# #INDENT# for sci in self . _get_chains_by_prs ( context , removed ) : #NEWLINE# #INDENT# chain_context = self . _get_chain_admin_context ( context . _plugin_context , instance_id = sci ) #NEWLINE# self . _notify_sc_consumer_removed ( chain_context , context . current , sci ) #NEWLINE# #UNINDENT# #UNINDENT# if added : #NEWLINE# #INDENT# for sci in self . _get_chains_by_prs ( context , added ) : #NEWLINE# #INDENT# chain_context = self . _get_chain_admin_context ( context . _plugin_context , instance_id = sci ) #NEWLINE# self . _notify_sc_consumer_removed ( chain_context , added . current , sci )