def gen_cumulative_split_costs_only(self, settings, data):
        self.cumulative_split_costs = {}
        if self.root.is_leaf:
            self.cumulative_split_costs[self.root] = 0.
            remaining = []
        else:
            self.cumulative_split_costs[self.root] = self.max_split_costs[self.root]
            remaining = [self.root.left, self.root.right]
        while True:
            try:
                node_id = remaining.pop(0)
            except IndexError:
                break
            self.cumulative_split_costs[node_id] = self.cumulative_split_costs[node_id.parent] \
                                                    + self.max_split_costs[node_id]
            if not node_id.is_leaf:
                remaining.append(node_id.left)
                remaining.append(node_id.right)
creates node_id.cumulative_split_cost as well as a dictionary self.cumulative_split_costs
dataset/ETHPy150Open balajiln/mondrianforest/src/mondrianforest.py/MondrianTree.gen_cumulative_split_costs_only