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: cell2md.m
    path of file: ./repos/bspm/dependencies
    
    the code of the file until where you have to start completion: function varargout = cell2md(X, varargin)
% CELL2MD Save a cell array as a markdown table
% 
%  USAGE: cell2md(X, varargin)
% __________________________________________________________________________
%  INPUTS
%   X:              cell array to write (can be numeric or char array, in 
%                   which case it will be converted to a cell array)
%   VARARGIN:       optional arguments entered as "name,value" pairs: 
%       outfile     - name for output file (default: cell2md_YYYY_MM_dd)
%       hdrnames    - name for column headers (default: first row of X)
%       alignment   - horz alignment for columns (can be 1x1 char to use 
%                     same alignment for all columns, or 1 x size(X,2) cell 
%                     array to use column-specific alignments)
% __________________________________________________________________________
%  EXAMPLE USAGE
%    X = num2cell(rand(10, 3));
%    Save with default filename and alignment with column headers A, B, C
%    cell2md(X, 'hdr', {'A' 'B' 'C'});
% 
% 
% ---------------------- Copyright (C) 2015 Bob Spunt ----------------------
% 	Created:  2015-06-11
% 	Email:    spunt@caltech.edu
% _________________________________________
    
function argstruct = setargs(defaults, optargs)
% SETARGS Name/value parsing and assignment of varargin with default values
% 
% This is a utility for setting the value of optional arguments to a
% function. The first argument is required and should be a cell array of
% "name, default value" pairs for all optional arguments. The second
% argument is optional and should be a cell array of "name, custom value"
% pairs for at least one of the optional arguments.
% 
%  USAGE: argstruct = setargs(defaults, args)  
% __________________________________________________________________________
%  OUTPUT
% 
% 	argstruct: structure containing the final argument values
% __________________________________________________________________________
%  INPUTS
% 
% 	defaults:  
%       cell array of "name, default value" pairs for all optional arguments
% 
% 	optargs [optional]     
%       cell array of "name, custom value" pairs for at least one of the
%       optional arguments. this will typically be the "varargin" array. 
% __________________________________________________________________________
%  USAGE EXAMPLE (WITHIN FUNCTION)
% 
%     defaults    = {'arg1', 0, 'arg2', 'words', 'arg3', rand}; 
%     argstruct   = setargs(defaults, varargin)
%


% ---------------------- Copyright (C) 2015 Bob Spunt ----------------------
%	Created:  2015-03-11
%	Email:    spunt@caltech.edu
% 
%   This program is free software: you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation, either version 3 of the License, or (at
%   your option) any later version.
%       This program is distributed in the hope that it will be useful, but
%   WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%   General Public License for more details.
%       You should have received a copy of the GNU General Public License
%   along with this program.  If not, see: http://www.gnu.org/licenses/.
% __________________________________________________________________________
if nargin < 1, mfile_showhelp; return; end