def _get_root_node(tree: DecisionTreeClassificationModel): return tree._call_java('rootNode')
def _get_root_node(tree: DecisionTreeClassificationModel): if hasattr(tree, 'trees'): return tree.trees[0]._call_java('rootNode') else: return tree._call_java('rootNode')