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_norm_population.m
    path of file: ./repos/fieldtrip/external/spm12/toolbox/DARTEL
    
    the code of the file until where you have to start completion: function out = spm_norm_population(job)
% Obtain mapping from population average to ICBM space
% FORMAT spm_norm_population(job)
% job.template - name of population average template
%
%________________________________________________________
% (c) Wellcome Trust Centre for NeuroImaging (2011)

% John Ashburner
% $Id: spm_norm_population.m 5677 2013-10-10 18:59:11Z john $

% Hard coded stuff, that should maybe be customisable
Ng  = nifti(fullfile(spm('Dir'),'toolbox','DARTEL','icbm152.nii'));
prm = [0 0.05 0.05 0.00000001 0.05 2 2 6 0];

if ~isempty(job.template{1})

    
function out = spm_norm_population(job)
% Obtain mapping from population average to ICBM space
% FORMAT spm_norm_population(job)
% job.template - name of population average template
%
%________________________________________________________
% (c) Wellcome Trust Centre for NeuroImaging (2011)

% John Ashburner
% $Id: spm_norm_population.m 5677 2013-10-10 18:59:11Z john $

% Hard coded stuff, that should maybe be customisable
Ng  = nifti(fullfile(spm('Dir'),'toolbox','DARTEL','icbm152.nii'));
prm = [0 0.05 0.05 0.00000001 0.05 2 2 6 0];

if ~isempty(job.template{1})
    Nf = nifti(job.template{1});
else
    error('Incorrect Usage');
end