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: spm_mci_mvnpost.m
    path of file: ./repos/spm/toolbox/mci/inference
    
    the code of the file until where you have to start completion: function [stats,Y,X] = spm_mci_mvnpost (post,method,verbose,max_lag)
% Are MCMC samples consistent with Gaussian posterior ?
% FORMAT [stats,Y,X] = spm_mci_mvnpost (post,method,verbose,max_lag)
%
% post      posterior data structure from spm_mci_post
% method    'ESS' or 'thinning'
% verbose   create plots
% max_lag   maximum potential lag for MAR model
% 
% stats     (multivariate) normal test statistics
%           See spm_mci_mvntest.m
% Y         uncorrelated posterior samples
% X         original posterior samples
% 
% Run Gaussianity test on Markov chain samples
%__________________________________________________________________________


    
function [stats,Y,X] = spm_mci_mvnpost (post,method,verbose,max_lag)
% Are MCMC samples consistent with Gaussian posterior ?
% FORMAT [stats,Y,X] = spm_mci_mvnpost (post,method,verbose,max_lag)
%
% post      posterior data structure from spm_mci_post
% method    'ESS' or 'thinning'
% verbose   create plots
% max_lag   maximum potential lag for MAR model
% 
% stats     (multivariate) normal test statistics
%           See spm_mci_mvntest.m
% Y         uncorrelated posterior samples
% X         original posterior samples
% 
% Run Gaussianity test on Markov chain samples
%__________________________________________________________________________

% Will Penny
% Copyright (C) 2015 Wellcome Trust Centre for Neuroimaging

try, pmax=max_lag; catch, pmax=10; end