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: CBIG_ArealMSHBM_cMSHBM_estimate_group_priors_parent.m
    path of file: ./repos/CBIG/stable_projects/brain_parcellation/Kong2022_ArealMSHBM/step2_estimate_priors
    
    the code of the file until where you have to start completion: function Params = CBIG_ArealMSHBM_cMSHBM_estimate_group_priors_parent(project_dir, mesh, ...
     num_sub, num_sess, num_clusters, beta, tmp_dir, max_iter)

% Params = CBIG_Area
    
function log_vmf = vmf_probability(X,nu,kappa)

% log of von Mises-Fisher distribution
% X: input data
% nu: mean direction
% kap: concentration parameter. kap is a 1xL vector

dim = size(X,2)-1;
log_vmf = bsxfun(@plus,Cdln(kappa,dim),bsxfun(@times,kappa,X*nu));

end