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_hMRF_generate_fs6_lhrh_nborhood.m
    path of file: ./repos/CBIG/stable_projects/brain_parcellation/Yan2023_homotopic/code/utilities
    
    the code of the file until where you have to start completion: function lh_rh_Neighborhood = CBIG_hMRF_generate_fs6_lhrh_nborhood(outdir)
% CBIG_hMRF_generate_fs6_lhrh_nborhood(outdir)
% 
% The left and right fsaverage6 hemispheres were first registered using the Freesurfer's 'mris_left_right_register'
% function. After registration, the closest right hemisphere vertex was found for each left hemisphere vertex.
% Similarly, t
    
function avg_mesh = ReadNCAvgMesh_additional_input_var(hemi, mesh_name, surf_type, label, SUBJECTS_DIR)

% Read the average mesh (from FREESURFER) of normal control people. This is modified based on CBIG_ReadNCAvgMesh
% since here we need to specify SUBJECTS_DIR.
% 
%   avg_mesh = ReadNCAvgMesh_additional_input_var(hemi, mesh_name, surf_type, label, SUBJECTS_DIR)
%   Input:
%       hemi        : 'lh' or 'rh'
%       mesh_name   : 'fsaverage6', 'fsaverage5', 'fsaverage4'
%       surf_type   : 'inflated', 'white', 'sphere'
%       label       : 'cortex', 'Yeo2011_7Networks_N1000.annot'
%   Output: 
%       avg_mesh    : average mesh
% 
%   PS: For more labels, check $FREESURFER_HOME/subjects/fsaverage/label
%
% Written by Xiaoxuan Yan CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md

if(nargin < 3)
    surf_type = 'white'; 
end