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: bst_openmeeg.m
    path of file: ./repos/brainstorm3/toolbox/forward
    
    the code of the file until where you have to start completion: function [Gain, errMsg] = bst_openmeeg(OPTIONS)
% BST_OPENMEEG: Call OpenMEEG to compute a BEM solution for Brainstorm.
%
% USAGE:  [Gain, errMsg] = bst_openmeeg(OPTIONS)
%
% INPUT: 
%     - OPTI
    
function for computing DSM
    if ~om_call(['om_assemble ' strDsm], ['"' geomfile '" "' condfile '" "' dipfile '"'], dsmfile, 'Assembling dipoles source matrix...')
        return;
    end
end


%% ===== INTERPOLATION OPERATOR =====
% === EEG ===
if isEeg
    % Save electrodes file
    eegloc = cat(2, OPTIONS.Channel(OPTIONS.iEeg).Loc)';
    save(eegloc_file, 'eegloc', '-ASCII', '-double');
    % Compute HE2EM
    if ~om_call('om_assemble -H2EM', ['"' geomfile '" "' condfile '" "' eegloc_file '"'], h2emfile, 'Assembling EEG interpolation operator...')
        return;
    end