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_MELODIC.m
    path of file: ./repos/automaticanalysis/aa_modules
    
    the code of the file until where you have to start completion: % AA module
% Runs MELODIC on all sessions of each single subject
% This automatically transforms t
    
function may become obsolete later on]

function [aap,resp]=aamod_melodic(aap,task,subj)

resp='';

switch task
        
    case 'report'
        html = fullfile(aas_getsubjpath(aap,subj),'MELODIC','report','00index.html');
        
        aap = aas_report_add(aap,subj,'<table><tr>');
        aap = aas_report_add(aap,subj,sprintf('<td><a href="%s">FSL MELODIC report: %s</a><br></td>',html,html));
        aap = aas_report_add(aap,subj,'</tr></table>');
    case 'doit'
        
        spaced_EPIimg = [];
        for sess = aap.acq_details.selected_sessions
            % Let us use the native space...
            EPIimg = aas_getfiles_bystream(aap,subj,sess,'epi');
            
            for e = 1:size(EPIimg,1)
                spaced_EPIimg = [spaced_EPIimg EPIimg(e,:) ' '];
            end