code: def ball_tree_query(tree, data, n_neighbors, return_distance):
      op = BallTreeQuery(
          tree=tree,
          n_neighbors=n_neighbors,
          return_distance=return_distance,
      )
      ret = op(data)
      if not return_distance:
          return ret[0]
      return ret
  
file_path: mars/mars/learn/neighbors/_ball_tree.py
imports: from ...None import opcodes
  from ...utils import require_not_none
  from .tree import TreeObject, TreeBase, TreeQueryBase
label_desc: Use image node_id 1 for calling a global function with example usage: ball_tree_query(tree, data, n_neighbors, return_distance) and returns: ret, ret