code: def test_tree_node_add_paths_error() -> None:
      with pytest.raises(ValueError):
          tree = _TreeNode()
          tree.add_path([("a", [0, 1, 2], 0)])
          tree.add_path([("a", [0, 1], 0)])
  
      with pytest.raises(ValueError):
          tree = _TreeNode()
          tree.add_path([("a", [0, 1, 2], 0)])
          tree.add_path([("b", [0, 1, 2], 0)])
  
file_path: optuna/tests/samplers_tests/test_brute_force.py
imports: import numpy
  import pytest
  import optuna
  from optuna import samplers
  from optuna.samplers._brute_force import _TreeNode
  from optuna.trial import Trial
label_desc: Use image node_id 2 for calling a global function with example usage: test_tree_node_add_paths_error() without return types