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: GCO_Swap.m
    path of file: ./repos/microshift_compression/matlab code/Toolkits/gco-v3.0/matlab
    
    the code of the file until where you have to start completion: function Energy = GCO_Swap(Handle,MaxIter)
% GCO_Swap   Run alpha-beta-swap algorithm.
%    GCO_Swap(Handle) runs alpha-beta-swap until convergence.
%    GCO_Swap(Handle,MaxIter) runs at most MaxIter swap cycles.
%    Returns the energy of the computed labeling.
%    The labeling itself can be retrieved via GCO_GetLabeling.

    
function Energy = GCO_Swap(Handle,MaxIter)
% GCO_Swap   Run alpha-beta-swap algorithm.
%    GCO_Swap(Handle) runs alpha-beta-swap until convergence.
%    GCO_Swap(Handle,MaxIter) runs at most MaxIter swap cycles.
%    Returns the energy of the computed labeling.
%    The labeling itself can be retrieved via GCO_GetLabeling.
%    The order of expansion can be influenced by GCO_SetLabelOrder.
%
%    Note that neither label costs nor sparse data costs are currently
%    implement for alpha-beta-swap.

GCO_LoadLib();
if (nargin < 1), error('Swap requires handle to GCO instance'); end