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: view_fem_tensors.m
    path of file: ./repos/brainstorm3/toolbox/gui
    
    the code of the file until where you have to start completion: function [hFig, iDS, iFig] = view_fem_tensors(FemFile, DisplayMode, iTissues, AnatFile, hFig)
% VIEW_FEM_TENSORS: Display FEM conductivity tensors.
%
% USAGE:  [hFig, iDS, iFig] = view_fem_tensors(FemFile, DisplayMode='ellipse', iTissues=[ask], AnatFile=[default MRI], hFig=[NewFigure])
%
% INPUT:
%     - FemFile     : full path to the FEM mesh file to display 
%     - DisplayMode : {'ellipse', 'arrow'}
%     - iTissues    : List of tissues to display in the file (if not defined, ask the user)
%     - AnatFile    : Path to a MRI or FEM file in the database
%     - hFig        : Specify the figure in which to display the surface (otherwise creates a new figure)
%
% OUTPUT : 
%     - hFig : Matlab handle to the 3DViz figure that was created or updated
%     - iDS  : DataSet index in the GlobalData variable
%     - iFig : Indice of returned figure in the GlobalData(iDS).Figure array
% If an error occurs : all the returned variables are set to an empty matrix []

% @=============================================================================
% This function is part of the Brainstorm software:
% https://neuroimage.usc.edu/brainstorm
% 
% Copyright (c) University of Southern California & McGill University
% This software is distributed under the terms of the GNU General Public License
% as published by the Free Software Foundation. Further details on the GPLv3

    
function [hFig, iDS, iFig] = view_fem_tensors(FemFile, DisplayMode, iTissues, AnatFile, hFig)
% VIEW_FEM_TENSORS: Display FEM conductivity tensors.
%
% USAGE:  [hFig, iDS, iFig] = view_fem_tensors(FemFile, DisplayMode='ellipse', iTissues=[ask], AnatFile=[default MRI], hFig=[NewFigure])
%
% INPUT:
%     - FemFile     : full path to the FEM mesh file to display 
%     - DisplayMode : {'ellipse', 'arrow'}
%     - iTissues    : List of tissues to display in the file (if not defined, ask the user)
%     - AnatFile    : Path to a MRI or FEM file in the database
%     - hFig        : Specify the figure in which to display the surface (otherwise creates a new figure)
%
% OUTPUT : 
%     - hFig : Matlab handle to the 3DViz figure that was created or updated
%     - iDS  : DataSet index in the GlobalData variable
%     - iFig : Indice of returned figure in the GlobalData(iDS).Figure array
% If an error occurs : all the returned variables are set to an empty matrix []

% @=============================================================================
% This function is part of the Brainstorm software:
% https://neuroimage.usc.edu/brainstorm
% 
% Copyright (c) University of Southern California & McGill University
% This software is distributed under the terms of the GNU General Public License
% as published by the Free Software Foundation. Further details on the GPLv3
% license can be found at http://www.gnu.org/copyleft/gpl.html.
% 
% FOR RESEARCH PURPOSES ONLY. THE SOFTWARE IS PROVIDED "AS IS," AND THE
% UNIVERSITY OF SOUTHERN CALIFORNIA AND ITS COLLABORATORS DO NOT MAKE ANY
% WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
% MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, NOR DO THEY ASSUME ANY
% LIABILITY OR RESPONSIBILITY FOR THE USE OF THIS SOFTWARE.
%
% For more information type "brainstorm license" at command prompt.
% =============================================================================@
%
% Authors: Francois Tadel, Takfarinas Medani, 2020


%% ===== PARSE INPUTS =====
iDS  = [];
iFig = [];
% Get options
if (nargin < 5) || isempty(hFig)
    hFig = [];
elseif ishandle(hFig)
    [hFig,iFig,iDS] = bst_figures('GetFigure', hFig);
else
    error('Invalid figure handle.');
end