code: def test_tree_get_node_subspaces(tree: _FanovaTree) -> None:
      search_spaces = numpy.array([[0.0, 1.0], [0.0, 1.0], [0.0, 2.0]])
      search_spaces_copy = search_spaces.copy()
  
      # Test splitting on second feature, first node.
      expected_left_child_subspace = numpy.array(
          [[0.0, 1.0], [0.0, 0.5], [0.0, 2.0]]
      )
      expected_right_child_subspace = numpy.array(
          [[0.0, 1.0], [0.5, 1.0], [0.0, 2.0]]
      )
  
      numpy.testing.assert_array_equal(
          tree._get_node_left_child_subspaces(0, search_spaces),
          expected_left_child_subspace,
      )
      numpy.testing.assert_array_equal(
          tree._get_node_right_child_subspaces(0, search_spaces),
          expected_right_child_subspace,
      )
      numpy.testing.assert_array_equal(
          tree._get_node_children_subspaces(0, search_spaces)[0],
          expected_left_child_subspace,
      )
      numpy.testing.assert_array_equal(
          tree._get_node_children_subspaces(0, search_spaces)[1],
          expected_right_child_subspace,
      )
      numpy.testing.assert_array_equal(
          search_spaces, search_spaces_copy
      )
  
      # Test splitting on third feature, second node.
      expected_left_child_subspace = numpy.array(
          [[0.0, 1.0], [0.0, 1.0], [0.0, 1.5]]
      )
      expected_right_child_subspace = numpy.array(
          [[0.0, 1.0], [0.0, 1.0], [1.5, 2.0]]
      )
  
      numpy.testing.assert_array_equal(
          tree._get_node_left_child_subspaces(1, search_spaces),
          expected_left_child_subspace,
      )
      numpy.testing.assert_array_equal(
          tree._get_node_right_child_subspaces(1, search_spaces),
          expected_right_child_subspace,
      )
      numpy.testing.assert_array_equal(
          tree._get_node_children_subspaces(1, search_spaces)[0],
          expected_left_child_subspace,
      )
      numpy.testing.assert_array_equal(
          tree._get_node_children_subspaces(1, search_spaces)[1],
          expected_right_child_subspace,
      )
      numpy.testing.assert_array_equal(
          search_spaces, search_spaces_copy
      )
  
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 11 for calling a global function with example usage: test_tree_get_node_subspaces(tree) without return types