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: uigetvar.m
    path of file: ./repos/scGEAToolbox/+gui
    
    the code of the file until where you have to start completion: function [variable, varname] = uigetvar(variableclass)
% Gui to extract a variable from the base matlab workspace, allowing you to specify the class of variables viewed
% usage: [variable,varname] = uigetvar;
% usage: [variable,varname] = uigetvar(variableclass);
%
% uigetvar ALWAYS looks at the base matlab workspace,
% and allows you to import a single variable from that
% workspace.
%
% arguments: (input)
%  variableclass - a string that denotes the class of
%       the variables that will be shown in the gui menu.

    
function [variable, varname] = uigetvar(variableclass)
% Gui to extract a variable from the base matlab workspace, allowing you to specify the class of variables viewed
% usage: [variable,varname] = uigetvar;
% usage: [variable,varname] = uigetvar(variableclass);
%
% uigetvar ALWAYS looks at the base matlab workspace,
% and allows you to import a single variable from that
% workspace.
%
% arguments: (input)
%  variableclass - a string that denotes the class of
%       the variables that will be shown in the gui menu.
%       If more than one class is allowed, then use a
%       cell array of strings.
%
% arguments: (output)
%  variable - contents of the selected variable.
%
%  varname  - the name of the selected matlab variable
%       that was chosen from the workspace.
%
%       If cancel was indicated, then empty arrays
%       will be returned for both variable and varname.
%       Simply closing the window will cause the first
%
%
% See also: uigetdir, uigetfile, who, whos
%
%
% Author: John D'Errico
% e-mail: woodchips@rochester.rr.com
% Release: 1.0
% Release date: 2/19/10

% if variableclass is supplied, is it a string or a cellstr?
if (nargin > 1)
    error('UIGETVAR:multiple_arguments', 'Only 1 argument allowed for uigetvar')
    elseif (nargin > 0) && ~(ischar(variableclass) || iscellstr(variableclass))
        error('UIGETVAR:string', 'variableclass must be a string or a cell array of strings')
    elseif (nargin == 1) && ischar(variableclass)
        % only one class is provided. Just make it a cell
        % array to make things easier.
        variableclass = {variableclass};
    elseif (nargin == 0)
        % no class was indicated, so list all variables
        variableclass = {};
    end