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: panel_montage.m
    path of file: ./repos/brainstorm3/toolbox/gui
    
    the code of the file until where you have to start completion: function varargout = panel_montage(varargin)
% PANEL_MONTAGE: Edit sensor montages.
%
% USAGE:            panel_montage('ShowEditor');
%        [S,D,WL] = panel_montage('ParseNirsChannelNames', ChannelNames);

% @=============================================================================
% 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 COLLABORAT
    
function [AllGroups, AllTags, AllInd, isNoInd] = ParseSensorNames(Channels)
    % Only one type of sensors per call
    Modality = Channels(1).Type;
    % Get all groups
    AllGroups = {Channels.Group};
    % Get all names: remove special characters
    AllNames = {Channels.Name};
    if strcmpi(Modality, 'ECOG')
        % ECOG grids in Freiburg: G_A1, G_A2, ... , G_A8, G_B1, G_B2, ..., G_B8, G_C1, ...
        AllNames = strrep(AllNames, 'G_A', 'G0');
        AllNames = strrep(AllNames, 'G_B', 'G1');
        AllNames = strrep(AllNames, 'G_C', 'G2');
        AllNames = strrep(AllNames, 'G_D', 'G3');
        AllNames = strrep(AllNames, 'G_E', 'G4');
        AllNames = strrep(AllNames, 'G_F', 'G5');
        AllNames = strrep(AllNames, 'G_G', 'G6');
        AllNames = strrep(AllNames, 'G_H', 'G7');
        AllNames = strrep(AllNames, 'G_I', 'G8');
        AllNames = strrep(AllNames, 'G_K', 'G9');
        AllNames = strrep(AllNames, 'G_L', 'G10');
    end