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_eeg_channelselection.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8
    
    the code of the file until where you have to start completion: function S = spm_eeg_channelselection(S)
% Function for selection of channels
% FORMAT S = spm_eeg_channelselection(S)
% S - existing configuration struct (optional)
% Fields of S:
% S.channels - can be 'MEG', 'EEG', 'file', 'gui' or cell array of labels
% S.chanfile - filename (used in case S.channels = 'file')
% S.dataset - MEEG dataset name
% S.inputformat - data type (optional) to force the use of specific data
% reader
%
% OUTPUT:
%   S.channels - cell array of labels
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Vladimir Litvak
% $Id: spm_eeg_channelselection.m 3833 2010-04-22 14:49:48Z vladimir $

    
function S = spm_eeg_channelselection(S)
% Function for selection of channels
% FORMAT S = spm_eeg_channelselection(S)
% S - existing configuration struct (optional)
% Fields of S:
% S.channels - can be 'MEG', 'EEG', 'file', 'gui' or cell array of labels
% S.chanfile - filename (used in case S.channels = 'file')
% S.dataset - MEEG dataset name
% S.inputformat - data type (optional) to force the use of specific data
% reader
%
% OUTPUT:
%   S.channels - cell array of labels
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Vladimir Litvak
% $Id: spm_eeg_channelselection.m 3833 2010-04-22 14:49:48Z vladimir $

SVNrev = '$Rev: 3833 $';

%-Startup
%--------------------------------------------------------------------------
spm('FnBanner', mfilename, SVNrev);
spm('FigName','M/EEG channels selection');

%-Get parameters
%--------------------------------------------------------------------------
try
    S.channels;
catch
    S.channels = 'gui';
end