(self, target_class_index=0)
When the target class has changed, perform appropriate updates.
When the target class has changed, perform appropriate updates.
When the target class has changed perform appropriate updates .
def target_class_changed(self, target_class_index=0):
        """When the target class has changed, perform appropriate updates."""
        self._target_class_index = target_class_index

        def _recurse(node):
            node.target_class_index = target_class_index
            for child in node.children:
                _recurse(child)

        _recurse(self.root)
def target_class_changed ( self , target_class_index = 0 ) : self . _target_class_index = target_class_index def _recurse ( node ) : node . target_class_index = target_class_index for child in node . children : _recurse ( child ) _recurse ( self . root )