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: pick.m
    path of file: ./repos/FEMT2D/+tools
    
    the code of the file until where you have to start completion: function element = pick(which, varargin)
%pick Picks one of the given arguments.
%
% SYNTAX
%
%   X = pick(index, arg1[, arg2[, ...]])
%
% INPUT/OUTPUT PARAMETERS
%
%   X     ... Selected argument.
%   index ... Index of the argument that should be returned. E.g.
%             specify '2' to assign arg2 to X.
%   arg1  ... See description of 'index'.
%   arg2  ... See description of 'index'.
%
% (C) Martin Afanasjew
%

assert(which >= 1 && which <= length(varargin), ...

    
function element = pick(which, varargin)
%pick Picks one of the given arguments.
%
% SYNTAX
%
%   X = pick(index, arg1[, arg2[, ...]])
%
% INPUT/OUTPUT PARAMETERS
%
%   X     ... Selected argument.
%   index ... Index of the argument that should be returned. E.g.
%             specify '2' to assign arg2 to X.
%   arg1  ... See description of 'index'.
%   arg2  ... See description of 'index'.
%
% (C) Martin Afanasjew
%

assert(which >= 1 && which <= length(varargin), ...
    'Invalid index specified. You can only pick from the arguments you have supplied.');

element = varargin{which};
end