You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: kdtreequery.m
    path of file: ./repos/2015_Face_Detection/vlfeat/toolbox/noprefix
    
    the code of the file until where you have to start completion: function varargout = kdtreequery(varargin)
% VL_KDTREEQUERY Query KD-tree
%   [INDEX, DIST] = VL_KDTREEQUERY(KDTREE, X, Y) computes the nearest
%   column of X to each column of Y (in Euclidean distance). KDTREE is

    
function varargout = kdtreequery(varargin)
% VL_KDTREEQUERY Query KD-tree
%   [INDEX, DIST] = VL_KDTREEQUERY(KDTREE, X, Y) computes the nearest
%   column of X to each column of Y (in Euclidean distance). KDTREE is
%   a forest of kd-trees build by VL_KDTREEBUILD(). X is a
%   NUMDIMENSIONS x NUMDATA data matrix of class SINGLE or DOUBLE with
%   the data indexed by the kd-trees (it must be the same data matrix
%   passed to VK_KDTREEBUILD() to build the trees). Y is the
%   NUMDIMENSIONS x NUMQUERIES matrix of query points and must have
%   the same class of X. INDEX is a 1 x NUMQUERIES matrix of class
%   UINT32 with the index of the nearest column of X for each column
%   of Y. DIST is a 1 x NUMQUERIES vector of class SINGLE or DOUBLE
%   (depend