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_cli.m
    path of file: ./repos/bspm/thirdparty/spm12
    
    the code of the file until where you have to start completion: function spm_cli(varargin)
% Command line interface for SPM
%__________________________________________________________________________
% Copyright (C) 2016 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: spm_cli.m 6964 2016-12-07 16:50:41Z guillaume $ 


%-Input arguments
%-------------------------------------------
    
function [flags, h1s, ms] = get_items(c0)
flags = {}; h1s = {}; ms = [];
for i=1:numel(c0.val) % go recursive instead
    flag = {}; h1 = {}; m = [];
    if isa(c0.val{i},'cfg_repeat')
        % if more than one, they are not stored yet
        for j=1:numel(c0.val{i}.values)
            [flag, h1, m] = get_items(c0.val{i}.values{j});
            flag = [{c0.val{i}.values{j}.tag} flag];
            h1   = [{char(c0.val{i}.values{j}.help{:})} h1];
            m    = [is_mandatory(c0.val{i}.values{j}) m];
        end