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: FieldMap_create.m
    path of file: ./repos/spm/toolbox/FieldMap
    
    the code of the file until where you have to start completion: function [VDM,IPcell]=FieldMap_create(fm_imgs,epi_img,pm_defs)
% Function to create VDM file from fieldmap images and can be called
% using FieldMap_preprocess.m
%
% This function uses routines from the FieldMap toolbox to:
% 1) Create a single field map from input fieldmap data.
% 2) Convert fieldmap to a voxel displacement map (vdm_* file).
% 3) Match vdm_* to input EPI(s) which should be the first image
% that each session will be realigned/unwarped to. Writes out matched vdm
% file with name extension 'session' or a user-specified name.

    
function [VDM,IPcell]=FieldMap_create(fm_imgs,epi_img,pm_defs)
% Function to create VDM file from fieldmap images and can be called
% using FieldMap_preprocess.m
%
% This function uses routines from the FieldMap toolbox to:
% 1) Create a single field map from input fieldmap data.
% 2) Convert fieldmap to a voxel displacement map (vdm_* file).
% 3) Match vdm_* to input EPI(s) which should be the first image
% that each session will be realigned/unwarped to. Writes out matched vdm
% file with name extension 'session' or a user-specified name.
% 4) Each selected EPI is unwarped and written out with the prefix 'u'.
%
% For details about the FieldMap toolbox, see FieldMap.md. For a
% description of the components of the structure IP, see FieldMap.m.
% For an introduction to the theoretcial and practical principles behind
% the toolbox, see FieldMap_principles.md.
%__________________________________________________________________________

% Chloe Hutton
% Copyright (C) 2006-2022 Wellcome Centre for Human Neuroimaging


if nargin < 3
    error('field map images, epi image and defaults');
end