(self, node)
Get the range of indices where there are subnodes of the given node.

        See Also
        --------
        Orange.widgets.model.owclassificationtreegraph.OWTreeGraph
Get the range of indices where there are subnodes of the given node.
Get the range of indices where there are subnodes of the given node .
def _subnode_range(self, node):
        """
        Get the range of indices where there are subnodes of the given node.

        See Also
        --------
        Orange.widgets.model.owclassificationtreegraph.OWTreeGraph
        """

        def find_largest_idx(n):
            """It is necessary to locate the node with the largest index in the
            children in order to get a good range. This is necessary with trees
            that are not right aligned, which can happen when visualising
            random forest trees."""
            if self._tree.children_left[n] == self.NO_CHILD:
                return n

            l_node = find_largest_idx(self._tree.children_left[n])
            r_node = find_largest_idx(self._tree.children_right[n])

            return max(l_node, r_node)

        right = left = node
        if self._tree.children_left[left] == self.NO_CHILD:
            assert self._tree.children_right[node] == self.NO_CHILD
            return node, node
        else:
            left = self._tree.children_left[left]
            right = find_largest_idx(right)

            return left, right + 1
def _subnode_range ( self , node ) : def find_largest_idx ( n ) : """It is necessary to locate the node with the largest index in the
            children in order to get a good range. This is necessary with trees
            that are not right aligned, which can happen when visualising
            random forest trees.""" if self . _tree . children_left [ n ] == self . NO_CHILD : return n l_node = find_largest_idx ( self . _tree . children_left [ n ] ) r_node = find_largest_idx ( self . _tree . children_right [ n ] ) return max ( l_node , r_node ) right = left = node if self . _tree . children_left [ left ] == self . NO_CHILD : assert self . _tree . children_right [ node ] == self . NO_CHILD return node , node else : left = self . _tree . children_left [ left ] right = find_largest_idx ( right ) return left , right + 1