code: def test_neighbor_tree_two_point(
      Cls, dualtree, n_samples=100, n_features=3
  ):
      rng = check_random_state(0)
      X = rng.random_sample((n_samples, n_features))
      Y = rng.random_sample((n_samples, n_features))
      r = np.linspace(0, 1, 10)
      tree = Cls(X, leaf_size=10)
  
      D = DistanceMetric.get_metric("euclidean").pairwise(Y, X)
      counts_true = [(D <= ri).sum() for ri in r]
  
      counts = tree.two_point_correlation(Y, r=r, dualtree=dualtree)
      assert_array_almost_equal(counts, counts_true)
  
imports: import itertools
  import pickle
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal
  from sklearn.metrics import DistanceMetric
  from sklearn.neighbors._ball_tree import BallTree, kernel_norm
  from sklearn.neighbors._ball_tree import NeighborsHeap64
  from sklearn.neighbors._ball_tree import nodeheap_sort
  from sklearn.neighbors._ball_tree import simultaneous_sort
  from sklearn.neighbors._kd_tree import KDTree
  from sklearn.neighbors._kd_tree import NeighborsHeap64
  from sklearn.neighbors._kd_tree import nodeheap_sort
  from sklearn.neighbors._kd_tree import simultaneous_sort
  from sklearn.utils import check_random_state
label_desc: Use image node_id 7 for calling a global function with example usage: test_neighbor_tree_two_point(Cls, dualtree, n_samples, n_features) without return types