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: ft_select_channel.m
    path of file: ./repos/spm/external/fieldtrip/plotting
    
    the code of the file until where you have to start completion: function ft_select_channel(handle, eventdata, varargin)

% FT_SELECT_CHANNEL is a helper function that can be used as callback function
% in a figure. It allows the user to select a channel. The channel labels
% are returned.
%
% Use as
%   label = ft_select_channel(h, eventdata, ...)
% The first two arguments are automatically passed by MATLAB to any
% callback function.
%
% Additional options should be specified in key-value pairs and can be
%   'callback'  = function handle to be executed after channels have been selected
%
% You can pass additional arguments to the callback function in a cell-array 
% like {@function_handle,arg1,arg2}
%
% Exampl
    
function select_channel_multiple(callback,range,cmenulab) % last input is context menu label, see ft_select_range
% If this function is called from a plotting function that supports interactive subplots,
% then the current axis, which was used for selection, was given a tag that starts with 'axh' followed by a unique ID.
% If so, then the data (e.g. channel info) that should be used is contained in a subfield of the info (guidata)
% structure, with field name being the 'tag' in question.
% If no such tag is found, then the simple situation is assumed, where the data is contained in the 'root' field
tag = get(gca,'tag');
% in case subplots were used
if strncmp(tag,'axh',3)
  info   = guidata(gcf);
  x      = info.(tag).x(:);
  y      = info.(tag).y(:);
  label  = info.(tag).label(:);
else % no subplots were used
  info   = guidata(gcf);
  x      = info.x(:);
  y      = info.y(:);
  label  = info.label(:);
end