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: remove_response_mistakes.m
    path of file: ./repos/erplab/functions
    
    the code of the file until where you have to start completion: % PURPOSE: Finds and removes additional eventcodes
%          If the subject has pressed a key several times, this rem
    
function EEG = remove_response_mistakes(EEG, Stim_codes, Response_codes, print_report)

switch nargin
    
    case 4
        % all input specified
    case 3
        print_report = 1;
    otherwise
        warning('Please check remove_response_mistakes(EEG, Stim_code_array, Response_code_array)');
        return
        
        
end