<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fold_up(self, f_inter, f_leaf):
 """ Apply recursively the function f_inter from leaves to root, begining with function f_leaf on leaves. """

        return f_leaf(self) if self.leafnode else f_inter(self,
                                                          self.lower.fold_up(f_inter, f_leaf), 
                                                          self.greater.fold_up(f_inter, f_leaf))