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: xval_stratified_holdout_leave_whole_subject_out.m
    path of file: ./repos/CanlabCore/CanlabCore/Statistics_tools/Cross_validated_Regression
    
    the code of the file until where you have to start completion: % Create stratified k-fold holdout sets, balancing on outcome class and keeping observations from a grouping 
    
function [trIdx, teIdx, holdout_integer_indic] = xval_stratified_holdout_leave_whole_subject_out(varargin)


% ----------------------------------------------------------------------
% Parse inputs
% ----------------------------------------------------------------------
% Uses the inputParser object. Older schemes are below.

ARGS = parse_inputs(varargin{:});

fn = fieldnames(ARGS);

for i = 1:length(fn)
    str = sprintf('%s = ARGS.(''%s'');', fn{i}, fn{i});
    eval(str)
end