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: checkerBoard3D.m
    path of file: ./repos/MuRAT/Utilities_Matlab/GIBBON
    
    the code of the file until where you have to start completion: function M=checkerBoard3D(varargin)

% function M=checkerBoard3D(siz)
% ------------------------------------------------------------------------
% This function creates a checkboard image of the size siz whereby elements
% are either black (0) or white (1). The first element is white.
% example: siz=[12 12 6]; blockSize=2; 
%Block size in pixel units
% Kevin Mattheus Moerman
% gibbon.toolbox@gmail.com

    
function M=checkerBoard3D(varargin)

% function M=checkerBoard3D(siz)
% ------------------------------------------------------------------------
% This function creates a checkboard image of the size siz whereby elements
% are either black (0) or white (1). The first element is white.
% example: siz=[12 12 6]; blockSize=2; 
%Block size in pixel units
% Kevin Mattheus Moerman
% gibbon.toolbox@gmail.com
% 2008/08/15
% 2018/12/10 Added checkboard block size input
% ------------------------------------------------------------------------

%% Parse input

switch nargin
    case 1
        siz=varargin{1};
        blockSize=1;
    case 2        
        siz=varargin{1};        
        blockSize=varargin{2};
end