code: def test_tree_attrs(tree: _FanovaTree) -> None:
      assert tree._n_features == 3
  
      assert tree._n_nodes == 5
  
      assert not tree._is_node_leaf(0)
      assert not tree._is_node_leaf(1)
      assert tree._is_node_leaf(2)
      assert tree._is_node_leaf(3)
      assert tree._is_node_leaf(4)
  
      assert tree._get_node_left_child(0) == 1
      assert tree._get_node_left_child(1) == 2
      assert tree._get_node_left_child(2) == -1
      assert tree._get_node_left_child(3) == -1
      assert tree._get_node_left_child(4) == -1
  
      assert tree._get_node_right_child(0) == 4
      assert tree._get_node_right_child(1) == 3
      assert tree._get_node_right_child(2) == -1
      assert tree._get_node_right_child(3) == -1
      assert tree._get_node_right_child(4) == -1
  
      assert tree._get_node_children(0) == (1, 4)
      assert tree._get_node_children(1) == (2, 3)
      assert tree._get_node_children(2) == (-1, -1)
      assert tree._get_node_children(3) == (-1, -1)
      assert tree._get_node_children(4) == (-1, -1)
  
      assert tree._get_node_value(0) == -1.0
      assert tree._get_node_value(1) == -1.0
      assert tree._get_node_value(2) == 0.1
      assert tree._get_node_value(3) == 0.2
      assert tree._get_node_value(4) == 0.5
  
      assert tree._get_node_split_threshold(0) == 0.5
      assert tree._get_node_split_threshold(1) == 1.5
      assert tree._get_node_split_threshold(2) == -1.0
      assert tree._get_node_split_threshold(3) == -1.0
      assert tree._get_node_split_threshold(4) == -1.0
  
      assert tree._get_node_split_feature(0) == 1
      assert tree._get_node_split_feature(1) == 2
  
file_path: optuna/tests/importance_tests/fanova_tests/test_tree.py
imports: import math
  from typing import Dict
  from typing import List
  from typing import Tuple
  from unittest.mock import Mock
  import numpy
  import pytest
  from optuna.importance._fanova._tree import _FanovaTree
label_desc: Use image node_id 10 for calling a global function with example usage: test_tree_attrs(tree) without return types