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: om_write_geom.m
    path of file: ./repos/fieldtrip/external/openmeeg
    
    the code of the file until where you have to start completion: function om_write_geom(geomfile,bndfile,names,version)
%   OM_WRITE_COND
%       [] = OM_WRITE_GEOM(GEOMFILE,BNDFILE)
%       [] = OM_WRITE_GEOM(GEOMFILE,BNDFILE,NAMES)
%       [] = OM_WRITE_GEOM(GEOMFILE,BNDFILE,NAMES,VERSION)
%
%   Write geometry file for OpenMEEG, the default Domain Description has
%   been upgraded to '1.1'.
%
%   Authors: Alexandre Gramfort alexandre.gramfort@inria.fr
%            Paul Czienskowski

    
function om_write_geom(geomfile,bndfile,names,version)
%   OM_WRITE_COND
%       [] = OM_WRITE_GEOM(GEOMFILE,BNDFILE)
%       [] = OM_WRITE_GEOM(GEOMFILE,BNDFILE,NAMES)
%       [] = OM_WRITE_GEOM(GEOMFILE,BNDFILE,NAMES,VERSION)
%
%   Write geometry file for OpenMEEG, the default Domain Description has
%   been upgraded to '1.1'.
%
%   Authors: Alexandre Gramfort alexandre.gramfort@inria.fr
%            Paul Czienskowski

% Copyright (C) 2010-2017, OpenMEEG developers
% Copyright (C) 2022, Jan-Mathijs Schoffelen
numbnd = length(bndfile);

if nargin < 4
  version = '1.1';
end