def _tree_query_parallel_helper(tree, *args, **kwargs):
    """Helper for the Parallel calls in KNeighborsMixin.kneighbors.

    The Cython method tree.query is not directly picklable by cloudpickle
    under PyPy.
    """
    return tree.query(*args, **kwargs)