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: readVgiStack.m
    path of file: ./repos/matImage/matImage/imStacks
    
    the code of the file until where you have to start completion: function [img, info] = readVgiStack(fileName, varargin)
%READVGISTACK Read a 3D stack stored in VGI format
%
%   output = readVgiStack(input)
%
%   Example
%   readVgiStack
%
%   See also
%     readMetaImage, vgiStackInfo
 
% ------
% Author: David Legland
% e-mail: david.legland@inra.fr
% Created: 2018-10-18,    using Matlab 9.5.0.944444 (R2018b)
% Copyright 2018 INRA - Cepia Software Platform.

    
function [img, info] = readVgiStack(fileName, varargin)
%READVGISTACK Read a 3D stack stored in VGI format
%
%   output = readVgiStack(input)
%
%   Example
%   readVgiStack
%
%   See also
%     readMetaImage, vgiStackInfo
 
% ------
% Author: David Legland
% e-mail: david.legland@inra.fr
% Created: 2018-10-18,    using Matlab 9.5.0.944444 (R2018b)
% Copyright 2018 INRA - Cepia Software Platform.

%% Initialisations

% parse optional input arguments
verbose = false;
while length(varargin) >= 2
    name = varargin{1};
    if strcmp(name, 'verbose')
        verbose = varargin{2};
    end