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: ft_granddescriptives.m
    path of file: ./repos/automaticanalysis/aa_tools/toolboxes/fieldtrip_mods
    
    the code of the file until where you have to start completion: function groupDesc = ft_granddescriptives(cfg,varargin)

% FT_GRANDDESCRIPTIVES computes the descriptives (mean and SEM) of the specified measure over multiple subjects
%
% Use as
%   [groupDesc] = ft_granddescriptives(cfg, data1, data2, data3...)
%
% The input data data1..N are obtained from either FT_TIMELOCKANALYSIS or FT_FREQANALYSIS and MUST have consistent dimords.
% The configuration structure can contain
%   cfg.channel   = Nx1 cell-array with selection of channels (default = 'all'),
%                   see FT_CHANNELSELECTION for details
%   cfg.latency   = [tmin tmax] or 'all', to specify a subset of latencies (default = 'all')
%   cfg.parameter = string or cell-array of strings indicating which
%                   parameter(s) to average.
%
% See also FT_TIMELOCKGRANDAVERAGE, FT_FREQANALYSIS, FT_FREQDESCRIPTIVES,

    
function groupDesc = ft_granddescriptives(cfg,varargin)

% FT_GRANDDESCRIPTIVES computes the descriptives (mean and SEM) of the specified measure over multiple subjects
%
% Use as
%   [groupDesc] = ft_granddescriptives(cfg, data1, data2, data3...)
%
% The input data data1..N are obtained from either FT_TIMELOCKANALYSIS or FT_FREQANALYSIS and MUST have consistent dimords.
% The configuration structure can contain
%   cfg.channel   = Nx1 cell-array with selection of channels (default = 'all'),
%                   see FT_CHANNELSELECTION for details
%   cfg.latency   = [tmin tmax] or 'all', to specify a subset of latencies (default = 'all')
%   cfg.parameter = string or cell-array of strings indicating which
%                   parameter(s) to average.
%
% See also FT_TIMELOCKGRANDAVERAGE, FT_FREQANALYSIS, FT_FREQDESCRIPTIVES,
% FT_FREQBASELINE

% Copyright (C) 2020, Tibor Auer

%% Configuration
cfg.parameter = ft_getopt(cfg, 'parameter',  []);
if isempty(cfg.parameter)
    ft_error('you should specify a valid parameter to compute');
end