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: cat_conf_stoolsexp.m
    path of file: ./repos/cat12
    
    the code of the file until where you have to start completion: function stoolsexp = cat_conf_stoolsexp
%_______________________________________________________________________
% wrapper for calling CAT surface utilities
% ______________________________________________________________________
%
% Christian Gaser, Robert Dahnke
% Structural Brain Mapping Group (https://neuro-jena.github.io)
% Departments of Neurology and Psychiatry
% Jena University Hospital
% ______________________________________________________________________
% $Id$



%% average surface mesh
%-----------------------------------------------------------------------

  avg.data         = cfg_files;
  avg.data.tag     = 'data';
  avg.data.name    = 'Sample';
  avg.data.filter  = 'gifti';
  avg.data.ufilter = '^[rl]h.central';

    
function stoolsexp = cat_conf_stoolsexp
%_______________________________________________________________________
% wrapper for calling CAT surface utilities
% ______________________________________________________________________
%
% Christian Gaser, Robert Dahnke
% Structural Brain Mapping Group (https://neuro-jena.github.io)
% Departments of Neurology and Psychiatry
% Jena University Hospital
% ______________________________________________________________________
% $Id$



%% average surface mesh
%-----------------------------------------------------------------------

  avg.data         = cfg_files;
  avg.data.tag     = 'data';
  avg.data.name    = 'Sample';
  avg.data.filter  = 'gifti';
  avg.data.ufilter = '^[rl]h.central';
  avg.data.num     = [1 Inf];
  avg.data.help    = {
    'Select surfaces.'
    };

  avg.meshsmooth         = cfg_entry;
  avg.meshsmooth.tag     = 'meshsmooth';
  avg.meshsmooth.name    = 'Surface Smoothing Iterations';
  avg.meshsmooth.strtype = 'r';
  avg.meshsmooth.num     = [1 Inf];
  avg.meshsmooth.val     = {[0 2 32]};
  avg.meshsmooth.help    = {
    'Smoothing of the average surface. '
    ''
    };

  avg.surfside         = cfg_menu;
  avg.surfside.tag     = 'surfside';
  avg.surfside.name    = 'Side Handling';
  avg.surfside.labels  = {'separate','mirror'};
  avg.surfside.values  = {1,2};
  avg.surfside.val     = {1};
  avg.surfside.help    = {
    'Handling of the cortical hemispheres.'
    ''
    };
 
  avg.surfname         = cfg_entry;
  avg.surfname.tag     = 'surfname';
  avg.surfname.name    = 'Surface Filename';
  avg.surfname.strtype = 's';
  avg.surfname.num     = [1 Inf];
  avg.surfname.val     = {'average'};
  avg.surfname.help    = {'Name of the surface.'};

  avg.outdir         = cfg_files;
  avg.outdir.tag     = 'outdir';
  avg.outdir.name    = 'Output Directory';
  avg.outdir.filter  = 'dir';
  avg.outdir.ufilter = '.*';
  avg.outdir.num     = [0 1];
  avg.outdir.val{1}  = {''};
  avg.outdir.dir     = fullfile(fileparts(mfilename('fullpath')));
  avg.outdir.help    = {'Select a directory where files are written.'};

  avg.main          = cfg_exbranch;
  avg.main.tag      = 'avg_surf';
  avg.main.name     = 'Average Surface Mesh';
  avg.main.val      = {
    avg.data ...
    avg.meshsmooth ...
    avg.surfside ...
    avg.surfname ...
    avg.outdir ...
    };
  avg.main.vfiles   = @vfiles_avg;  
  avg.main.prog     = @cat_surf_avg;
  avg.main.help     = {
    'Averaging of cortical surfaces.'
    ''
    };

  %}
  
%% data smoothing
%-----------------------------------------------------------------------
  smooth.data         = cfg_files;
  smooth.data.tag     = 'data';
  smooth.data.name    = 'Sample';
  smooth.data.filter  = 'any';
  smooth.data.ufilter = '^[rl]h.(?!cent|pial|white|sphe|defe|hull).*';
  smooth.data.num     = [1 Inf];
  smooth.data.help    = {'Select surface data (texture) files for smoothing.'};
  
  smooth.fwhm         = cfg_entry;
  smooth.fwhm.tag     = 'fwhm';
  smooth.fwhm.name    = 'Smoothing filter size in fwhm';
  smooth.fwhm.strtype = 'r';
  smooth.fwhm.num     = [1 1];
  smooth.fwhm.val     = {15};
  smooth.fwhm.help    = {
    'Select filter size for smoothing. For cortical thickness a good starting value is 15mm, while other surface parameters based on cortex folding (e.g. gyrification, cortical complexity) need a larger filter size of about 25mm.'};
 
  smooth.main      = cfg_exbranch;
  smooth.main.tag  = 'datasmooth';
  smooth.main.name = 'Smooth Surface Data';
  smooth.main.val  = {
    smooth.data ...
    smooth.fwhm ...
  };
  smooth.main.vfiles = @vfiles_smooth;
  smooth.main.prog = @cat_surf_smooth;
  smooth.main.help = {
    'Gaussian smoothing of surface data (texture).'
    ''
  }; 



%% Toolset
%-----------------------------------------------------------------------
  
  stoolsexp = cfg_choice;
  stoolsexp.name   = 'Surface Developer Tools';
  stoolsexp.tag    = 'stoolsexp';
  stoolsexp.values = {...
    smooth.main, ...
    avg.main, ...
    };

return



%% Result files
%_______________________________________________________________________
function vf = vfiles_smooth(job)
  vf    = job.data; 
  sinfo = cat_surf_info(job.data);
  for i=1:numel(vf)
    vf(i) = cat_surf_rename(sinfo(i),'dataname',sprintf('s%d%s',job.fwhm,sinfo(i).dataname));
  end