code: def test_array_object_type(BinarySearchTree):
      """Check that we do not accept object dtype array."""
      X = np.array([(1, 2, 3), (2, 5), (5, 5, 1, 2)], dtype=object)
      with pytest.raises(
          ValueError, match="setting an array element with a sequence"
      ):
          BinarySearchTree(X)
  
file_path: scikit-learn/sklearn/neighbors/tests/test_kd_tree.py
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_equal
  from sklearn.neighbors._kd_tree import KDTree, KDTree32, KDTree64
  from sklearn.neighbors.tests.test_ball_tree import get_dataset_for_binary_tree
  from sklearn.utils.parallel import Parallel, delayed
label_desc: Use image node_id 2 for calling a global function with example usage: test_array_object_type(BinarySearchTree) without return types