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: eeg_eval.m
    path of file: ./repos/eeglab/functions/adminfunc
    
    the code of the file until where you have to start completion: % EEG_EVAL - apply eeglab function to a collection of input datasets
%
% Usage:
%   >> OUTEEG = eeg_eval(funcname, INEEG, 'key1', value1, 'key2', value2 ...);
%
% Inputs:
%   funcname      - [string] name of the function
%   INEEG         - EEGLAB input dataset(s)
%
% Optional inputs
%   'params'      - [cell array] funcname parameters.
%   'warning'     - ['on'|'off'] warning pop-up window if several dataset
%                   stored on disk that will be automatically overwritten.
%                   Default is 'on'.
%
% Outputs:
%   OUTEEG        - output dataset(s)
%
% Author: Arnaud De
    
function
    % ----------------
    v = version;
    if str2num(v(1)) == '5' % Matlab 5
        command = [ 'TMPEEG = ' funcname '( TMPEEG, ' vararg2str(g.params) ');' ];
    elseif isstr(funcname)
        eval( [ 'func = @' funcname ';' ] );
    else
        func = funcname;
    end
    
%     notCompatibleFunc = { 
%         @clean_artifacts
%     };
    
    NEWEEG = EEG;
    parstatus_changed = 0;

    if option_parallel
        if exist('gcp')
            disp('Using the parallel toolbox to process multiple datasets (change in File > Preferences)');
            ps = parallel.Settings;
            parstatus = ps.Pool.AutoCreate;
            ps.Pool.AutoCreate = true;
            parstatus_changed = 1;
        else
            disp('Parallel toolbox not found - nothing to worry about (except slower computation in some cases)');
        end
        
        tmpoptions_store = option_storedisk;
        parfor i = 1:length(EEG)
            fprintf('Processing group dataset %d of %d named: %s ****************\n', i, length(EEG), EEG(i).setname);
            TMPEEG    = eeg_retrieve(EEG, i);
            TMPEEG = feval(func, TMPEEG, g.params{:});
            TMPEEG = eeg_checkset(TMPEEG);
            TMPEEG.saved = 'no';
            if tmpoptions_store
                TMPEEG = pop_saveset(TMPEEG, 'savemode', 'resave');
                TMPEEG = update_datafield(TMPEEG);
                NEWEEG(i) = TMPEEG;
                NEWEEG(i).saved = 'yes'; % eeg_store by default set it to no
            else
                NEWEEG(i) = TMPEEG;
                NEWEEG(i).saved = 'yes'; % eeg_store by default set it to no
            end