code: def tree() -> _FanovaTree:
      sklearn_tree = Mock()
      sklearn_tree.n_features = 3
      sklearn_tree.node_count = 5
      sklearn_tree.feature = [1, 2, -1, -1, -1]
      sklearn_tree.children_left = [1, 2, -1, -1, -1]
      sklearn_tree.children_right = [4, 3, -1, -1, -1]
      # value has the shape (node_count, n_output, max_n_classes)
      sklearn_tree.value = numpy.array(
          [[[-1.0]], [[-1.0]], [[0.1]], [[0.2]], [[0.5]]]
      )
      sklearn_tree.threshold = [0.5, 1.5, -1.0, -1.0, -1.0]
  
      search_spaces = numpy.array([[0.0, 1.0], [0.0, 1.0], [0.0, 2.0]])
  
      return _FanovaTree(tree=sklearn_tree, search_spaces=search_spaces)
  
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 1 for calling a global function with example usage: tree() and returns: _FanovaTree