def make_finish(self,inter_val=1):
        '''
        Recursively marked as finish, until the above inter_val nodes of action_input type (including yourself)
        '''
        self.finished = True
        if self.node_type == "Action Input":
            inter_val -= 1
        if self.father != None and inter_val >= 0:
            self.father.make_finish(inter_val)

        Recursively marked as finish, until the above inter_val nodes of action_input type (including yourself)
        
toolbench/inference/Tree/Tree.py