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_SetSmoothCost.m
    path of file: ./repos/lrslibrary/algorithms/rpca/DECOLOR/gco-v3.0/matlab
    
    the code of the file until where you have to start completion: function GCO_SetSmoothCost(Handle,SmoothCost)

    
function GCO_SetSmoothCost(Handle,SmoothCost)
% GCO_SetSmoothCost   Set the smooth cost of neighboring sites.
%    GCO_SetSmoothCost(Handle,SmoothCost) with a NumLabels-by-NumLabels 
%    integer matrix makes SmoothCost(k,l) the unweighted cost 
%    of assigning labels k and l to any neighboring sites. 
%    For particular neighboring sites i,j the final, weighted cost
%    is actually Weights(i,j)*SmoothCost(k,l). The spatially-varying 
%    weights are determined by GCO_SetNeighbors.
%
%    If SetSmoothCost is never called, Potts model is used by default.
%    i.e. SmoothCost(k,l) = { 0 if k==l, 1 otherwise }
%
%    SetSmoothCost can be called repeatedly, even after Expansion.

GCO_LoadLib();
if (nargin < 2)
    error('Expected 2 arguments');
end
if (~isnumeric(SmoothCost))
    error('SmoothCost must be numeric');
end
NumLabels = gco_matlab('gco_getnumlabels',Handle);
if (size(SmoothCost) ~= [ NumLabels NumLabels ])
    error('SmoothCost size must be [ NumLabels NumLabels ]');
end