new_cls node causal_links [new_clinkfor consts in self protect_all_cls(node causal_links,new_a,consts )for consts in self protect_cl_for_actions(node actions,consts ,new_clink)yield arc(nodepop_node(new_actions,consts ,new_agenda ,new_cls)cost= given casual link ( subgoala )the following method protects the causal link from each action in actions whenever an action deletes subgoalthe action needs to be before or after this method enumerates all constraints that result from protecting the causal link from all actions stripspop py -(continued def protect_cl_for_actions(selfactionsconstrsclink)"""yields constraints that extend constrs and protect causal link ( subgoala for each action in actions ""if actionsa actions[ rem_actions actions[ : subgoala clink if ! and ! and self deletes( ,subgoal)if self possible(( , ),constrs)new_const self add_constraint(( , ),constrsfor in self protect_cl_for_actions(rem_actions,new_const,clink)yield could be "yield fromif self possible(( , ),constrs)new_const self add_constraint(( , ),constrsfor in self protect_cl_for_actions(rem_actions,new_const,clink)yield elsefor in self protect_cl_for_actions(rem_actions,constrs,clink)yield elseyield constrs given an action actthe following method protects all the causal links in clinks from act whenever act deletes subgoal from some causal link ( subgoala )the action act needs to be before or after this method enumerates all constraints that result from protecting the causal links from act stripspop py -(continued def protect_all_cls(selfclinksactconstrs)"""yields constraints that protect all causal links from act""if clinksversion june