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: spm_cfg_eeg_combineplanar.m
    path of file: ./repos/spm/config
    
    the code of the file until where you have to start completion: function combineplanar = spm_cfg_eeg_combineplanar
% configuration file for combineplanar
%__________________________________________________________________________

% Vladimir Litvak
% Copyright (C) 2009-2022 Wellcome Centre for Human Neuroimaging


%--------------------------------------------------------------------------
% crop
%--------------------------------------------------------------------------
combineplanar          = cfg_exbranch;
combineplanar.tag      = 'combineplanar';
combineplanar.name     = 'Combine planar';
combineplanar.val      = @combineplanar_cfg;
combineplanar.help     = {'Combine planar MEG channels'}';
combineplanar.prog     = @eeg_combineplanar;
combineplanar.vout     = @vout_eeg_combineplanar;
combineplanar.modality = {'EEG'};


%==========================================================================
function varargout = combineplanar_cfg

persistent cfg
if ~isempty(cfg), varargout = {cfg}; return; end

%--------------------------------------------------------------------------
% D
%--------------------------------------------------------------------------
D        = cfg_files;
D.tag    = 'D';
D.name   = 'File Name';
D.filter = 'mat';
D.num    = [1 1];
D.help   = {'Select the M/EEG mat file.'};

%--------------------------------------------------------------------------
% mode
%--------------------------------------------------------------------------
mode = cfg_menu;
mode.tag = 'mode';
mode.name = 'Copying mode';
mode.labels = {'Append', 'Replace planar', 'Replace all MEG', 'Only keep combined'};
mode.val = {'replace'};
mode.values = {'append', 'replace', 'replacemeg', 'keep'};
mode.help = {'Select which channels to copy to the new combined dataset'};

%--------------------------------------------------------------------------
% prefix
%--------------------------------------------------------------------------
prefix         = cfg_entry;
prefix.tag     = 'prefix';
prefix.name    = 'Filename Prefix';
prefix.help    = {'Specify the string to be prepended to the filenames of the output dataset. Default prefix is ''P''.'};
prefix.strtype = 's';
prefix.num     = [1 Inf];
prefix.val     = {'P'};


    
function combineplanar = spm_cfg_eeg_combineplanar
% configuration file for combineplanar
%__________________________________________________________________________

% Vladimir Litvak
% Copyright (C) 2009-2022 Wellcome Centre for Human Neuroimaging


%--------------------------------------------------------------------------
% crop
%--------------------------------------------------------------------------
combineplanar          = cfg_exbranch;
combineplanar.tag      = 'combineplanar';
combineplanar.name     = 'Combine planar';
combineplanar.val      = @combineplanar_cfg;
combineplanar.help     = {'Combine planar MEG channels'}';
combineplanar.prog     = @eeg_combineplanar;
combineplanar.vout     = @vout_eeg_combineplanar;
combineplanar.modality = {'EEG'};


%==========================================================================
function varargout = combineplanar_cfg

persistent cfg
if ~isempty(cfg), varargout = {cfg}; return; end

%--------------------------------------------------------------------------
% D
%--------------------------------------------------------------------------
D        = cfg_files;
D.tag    = 'D';
D.name   = 'File Name';
D.filter = 'mat';
D.num    = [1 1];
D.help   = {'Select the M/EEG mat file.'};

%--------------------------------------------------------------------------
% mode
%--------------------------------------------------------------------------
mode = cfg_menu;
mode.tag = 'mode';
mode.name = 'Copying mode';
mode.labels = {'Append', 'Replace planar', 'Replace all MEG', 'Only keep combined'};
mode.val = {'replace'};
mode.values = {'append', 'replace', 'replacemeg', 'keep'};
mode.help = {'Select which channels to copy to the new combined dataset'};

%--------------------------------------------------------------------------
% prefix
%--------------------------------------------------------------------------
prefix         = cfg_entry;
prefix.tag     = 'prefix';
prefix.name    = 'Filename Prefix';
prefix.help    = {'Specify the string to be prepended to the filenames of the output dataset. Default prefix is ''P''.'};
prefix.strtype = 's';
prefix.num     = [1 Inf];
prefix.val     = {'P'};

[cfg,varargout{1}] = deal({D, mode, prefix});


%==========================================================================
function out = eeg_combineplanar(job)
% construct the S struct
S           = job;
S.D         = S.D{1};
out.D       = spm_eeg_combineplanar(S);
out.Dfname  = {fullfile(out.D)};

%==========================================================================
function dep = vout_eeg_combineplanar(job)
% return depend