#NEWLINE# def _get_chains_by_prs( self , context , prs_ids ) : #NEWLINE# #INDENT# result = set ( ) #NEWLINE# for prs in self . _get_policy_rule_sets ( context . _plugin_context . elevated ( ) , { #NEWLINE# #INDENT# 'id' : prs_ids , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# if prs [ 'providing_policy_target_groups' ] : #NEWLINE# #INDENT# result |= set ( [ x . servicechain_instance_id for x in self . _get_ptg_servicechain_mapping ( context . _plugin_context . session , provider_ptg_ids = prs [ 'providing_policy_target_groups' ] ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# return result