function varargout = setupProjectExample(arg,workDir)
% 

%   Copyright 2018 The MathWorks, Inc. 

metadata = findExample(arg);

% Determine workDir
if nargin < 2 || isempty(workDir)
    workDir = exampleUtils.getWorkDir(metadata);
else
    workDir = exampleUtils.validateWorkDir(workDir);
end

% Setup workdir.
exampleUtils.setupWorkDir(workDir);

if nargout
    varargout{1} = workDir;
    varargout{2} = metadata;
end
end
