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: surface_decoder.m
    path of file: ./repos/BrainStat/brainstat_matlab/context
    
    the code of the file until where you have to start completion: function [pearsons_r_sort, feature_names_sort] = surface_decoder(stat_data, options)
% SURFACE_DECODER    Decodes data on the surface. 
%
%   [pearsons_r_sort, feature_names_sort] = SURFACE_DECODER(stat_data) correlates the
%   data (stat_data) on the fsaverage5 surface with the meta-analytical
%   maps from Neurosynth. Returned are the Pearson correlation values and
%   the feature names associated with those values. Note that, as this
%   function only correlates data within the cortical surface, that
%   correlation values derived from this method may differ from those
%   derived with a whole brain map. 
%

    
function [pearsons_r_sort, feature_names_sort] = surface_decoder(stat_data, options)
% SURFACE_DECODER    Decodes data on the surface. 
%
%   [pearsons_r_sort, feature_names_sort] = SURFACE_DECODER(stat_data) correlates the
%   data (stat_data) on the fsaverage5 surface with the meta-analytical
%   maps from Neurosynth. Returned are the Pearson correlation values and
%   the feature names associated with those values. Note that, as this
%   function only correlates data within the cortical surface, that
%   correlation values derived from this method may differ from those
%   derived with a whole brain map. 
%
%   Valid name-value pairs are:
%       template
%           The template surface to use, either 'fsaverage5' or
%           'fsaverage', or 'fslr32k', defaults to 'fsaverage5'.
%       interpolation
%           The type of surface to volume interpolation. Currently only
%           'nearest' (nearest neighbor interpolation) is allowed.
%       data_dir
%           The directory to store the data. Defaults to
%           $HOME_DIR/brainstat_data/neurosynth_data.
%       database
%           The database to use for decoding. Currently only 'neurosynth' is
%           allowed.
%       ascend