def toggle_node(self, node):
        node.is_open = not node.is_open
        if node.is_open:
            if self.load_func and not node.is_loaded:
                self._do_node_load(node)
            self.dispatch('on_node_expand', node)
        else:
            self.dispatch('on_node_collapse', node)
        self._trigger_layout()
Toggle the state of the node (open/collapsed).
dataset/ETHPy150Open kivy/kivy/kivy/uix/treeview.py/TreeView.toggle_node