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: aamod_get_dicom_specialseries.m
    path of file: ./repos/automaticanalysis/aa_modules
    
    the code of the file until where you have to start completion: % This module finds all of the DICOM files associated with the given 
% specialsession using aas_listdicomfiles and the name of the special
% session, and copies them into the special session directory of this
% module, either across the local filesystem or from s3. In case of 
% multiple series specified for the same sessions, subfolders 'serie01',
% 'serie02', etc. will be created and images will be copie
    
function [aap resp]=aamod_get_dicom_specialseries(aap,task,subj,sess)
global aaworker

resp='';

switch task
    case 'report'
    case 'doit'
        % Go through each subsessions
        out=[];
        [d, mriser] = aas_get_series(aap,'special',subj,sess);
        for seriesind=1:numel(mriser)            
            [aap, dicom_files_src]=aas_listdicomfiles(aap,[subj d],mriser(seriesind));
            
            % Now copy files to this module's directory
            foldpath = fullfile(aas_getsesspath(aap,subj,sess), sprintf('serie%02d',seriesind));
            aas_makedir(aap,foldpath);
            outstream={};
            switch(aap.directory_conventions.remotefilesystem)
                case 'none'
                    for ind=1:numel(dicom_files_src)
                        copyfile(deblank(dicom_files_src{ind}),foldpath);
                        [pth nme ext]=fileparts(dicom_files_src{ind});
                        outstream{ind}=fullfile(foldpath,[nme ext]);
                    end