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: showSurf.m
    path of file: ./repos/bspm/thirdparty/MRtools_2015-08-21/Visualization
    
    the code of the file until where you have to start completion: function showSurf(fnL,fnR,th,lims,surf,cm)

if nargin==1
    if ~isempty(strfind(fnL,'_rh'))
        fnR = fnL;
        fnL = [];
    end
    
    if ~isempty(strfind(fnL,'_lh'))
        fnR = [];
    end   

    
function showSurf(fnL,fnR,th,lims,surf,cm)

if nargin==1
    if ~isempty(strfind(fnL,'_rh'))
        fnR = fnL;
        fnL = [];
    end
    
    if ~isempty(strfind(fnL,'_lh'))
        fnR = [];
    end   
end

if nargin<6
    cm = 'jet';
end

if isobject(gcf)
    obj.figno = get(gcf,'Number');
else
    obj.figno = gcf;
end