def is_finalizable(self):
        """method checks whether:
         - all counterpart of this node in dependent_on trees are finished
         - all direct children of the node are finished
         - the node itself is in active state"""

        composite_state = self.dependent_on_composite_state()
        if not composite_state.all_finished:
            return False

        if self.job_record is None:
            self.tree.timetable.assign_job_record(self)

        children_processed = all([child.job_record.is_finished for child in self.children.values()])

        return children_processed and self.job_record.is_active
def is_finalizable ( self ) : composite_state = self . dependent_on_composite_state ( ) if not composite_state . all_finished : return False if self . job_record is None : self . tree . timetable . assign_job_record ( self ) children_processed = all ( [ child . job_record . is_finished for child in self . children . values ( ) ] ) return children_processed and self . job_record . is_active
method checks whether:
         - all counterpart of this node in dependent_on trees are finished
         - all direct children of the node are finished
         - the node itself is in active state