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_run_bms_map.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/config
    
    the code of the file until where you have to start completion: function out = spm_run_bms_map (job)
% Run Bayesian Model Selection Maps

    
function out = spm_run_bms_map (job)
% Run Bayesian Model Selection Maps
% SPM job execution function
% takes a harvested job data structure and calls SPM functions to perform
% Bayesian Inference for Model Selection of Log. Evidence Maps  
% Input:
% job    - harvested job data structure (see matlabbatch help)
% Output:
% out    - computation results, usually a struct variable.
%
%
% Bayesian Inference on Model Space:
%
% The Random-effects 'RFX' method is described in Stephan et al. [1] 
% 'Bayesian Model Selection for Group Studies'.
% Output files (for each model): 
%       BMS.mat 
%       Exceedance Probability Maps (*epm.img),
%       Posterior Probability Maps (*ppm.img),
%       Dirichlet Paramters (alpha) Maps (*alpha.img).
%
% The Fixed-effects 'FFX' method adds together the log-evidences over 
% subjects/sessions for each group, then compares the group log-ev's. 
% This is also known as the Group Bayes Factor (GBF) approach [2]. 
% Output files (for each model):
%       BMS.mat 
%       Posterior Probability Maps (*ppm.img).
%
% BMS contains:
%     BMS.fname
%     BMS.map.ffx(rfx).data
%     BMS.map.ffx(rfx).ppm 
%     BMS.map.ffx(rfx).xppm     - only for RFX
%     BMS.map.ffx(rfx).epm      - only for RFX (optional)
%     BMS.map.ffx(rfx).alpha    - only for RFX
%
% [1] Rosa et al., 2009, Bayesian Model Selection Maps for Group Studies,
% NeuroImage.
% [2] Stephan et al., 2009, Bayesian Model Selection for Group Studies,
% NeuroImage.
% [3] Penny et al., 2004, Comparing Dynamic Causal Models, NeuroImage.
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging

% Maria Joao Rosa
% $Id: spm_run_bms_map.m 3624 2009-12-09 11:07:38Z maria $

% Input
% -------------------------------------------------------------------------
direct  = job.dir{1};
fname   = [direct,'BMS.mat'];       % Output filename (including directory)
mask    = length(job.mask{1});      % Mask image
if mask
   mask_image = spm_vol(job.mask);  % Mask image Vol
end