def transient_change_diff(self, transient_appeared, transient_gone, *class_build_args, **class_build_kwargs):
        """
        This should be called when we want to process a change in the status of the system (if we already have the diff)
        This function also applies changes due to regex_set updates if needed
        _transient_change_diff -> _update_transients
        """

        to_add = set(regexes_match_sublist(self.transients_args, transient_appeared))
        lost_matches = {n for n in self.transients if find_first_regex_match(n, self.transients_args) is None}
        to_remove = set(transient_gone) | lost_matches  # we stop interfacing with lost transient OR lost matches

        return self.update_transients(
            add_names=to_add,
            remove_names=to_remove,
            *class_build_args,
            **class_build_kwargs
        )
def transient_change_diff ( self , transient_appeared , transient_gone , * class_build_args , ** class_build_kwargs ) : to_add = set ( regexes_match_sublist ( self . transients_args , transient_appeared ) ) lost_matches = { n for n in self . transients if find_first_regex_match ( n , self . transients_args ) is None } to_remove = set ( transient_gone ) | lost_matches return self . update_transients ( add_names = to_add , remove_names = to_remove , * class_build_args , ** class_build_kwargs )
This should be called when we want to process a change in the status of the system (if we already have the diff)
        This function also applies changes due to regex_set updates if needed
        _transient_change_diff -> _update_transients