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: removepath.m
    path of file: ./repos/eeglab/functions/adminfunc
    
    the code of the file until where you have to start completion: % remove all path with a given parent path
% varargin contains a list of path to exclude

% Copyright (C) 2006 Arnaud Delorme
%
% This file is part of EEGLAB, see ht
    
function removepath(parentpath, varargin)

if isempty(parentpath), return; end
folder = path;
if ispc, sep = ';'; else sep = ':'; end
indSep = find(folder == sep);

indSep = [ 0 indSep length(folder)+1 ];
for iSep = 1:length(indSep)-1
    curPath = folder(indSep(iSep)+1:indSep(iSep+1)-1);
    if ~isempty(strfind(curPath, parentpath)) && ~any(strmatch(curPath, varargin, 'exact'))
        rmpath(curPath);
    end