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: patchUnderlay.m
    path of file: ./repos/brainSurfer/scripts/patch
    
    the code of the file until where you have to start completion: function [varargout] = patchUnderlay(varargin)
% This script patches either left  and/or right hemisphere vertices and
% adds default lighting. It can also add a new surface onto an existing
% figure.
%
% Call: 
% [underlay, brain] = plotUnderlay(vert1, face1) % plots one hemisphere
% [underlay, brain] = plotUnderlay(vert1, face1, vert2, face2) % plots two
% hemispheres
% [underlay, brain] = plotUnderlay(vert1, face1, 'add', hemi, brainFig, underlay) % adds a
% hemisphere to an existing patch

    
function [varargout] = patchUnderlay(varargin)
% This script patches either left  and/or right hemisphere vertices and
% adds default lighting. It can also add a new surface onto an existing
% figure.
%
% Call: 
% [underlay, brain] = plotUnderlay(vert1, face1) % plots one hemisphere
% [underlay, brain] = plotUnderlay(vert1, face1, vert2, face2) % plots two
% hemispheres
% [underlay, brain] = plotUnderlay(vert1, face1, 'add', hemi, brainFig, underlay) % adds a
% hemisphere to an existing patch
% [underlay, brain] = plotUnderlay(vert1, face1, 'add', hemi, brainFig, underlay, 'lights', [-90 0; 90 0; 0 0; 180 0]) % adds a
% hemisphere to an existing patch and adds certain non-default lights
% (though note these are the defaults ;-]). lights can be set to: 'off',
% left out to generate default lights, or an n x 2 array of n lights can be
% passed with locatons of lights.
% [underlay, brain] = plotUnderlay(vert1, face1, 'add', hemi, brainFig, underlay, 'lights', [-90 0; 90 0; 0 0; 180 0],'surfC',[0.5 0.5 0.5])
% Alex Teghipco // alex.teghipco@uci.edu // 11/28/18

% Default settings:
vert2 = [];
face2 = [];
n = nargin;

% check to make sure at least 3 arguments are passed (i.e., hopefully
% all the data for 1 surface)
if length(varargin) < 2
    error('You need to at least pass vertices and faces to patch')
end