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: isequal.m
    path of file: ./repos/chebfun/@deltafun
    
    the code of the file until where you have to start completion: function out = isequal(f, g)
%ISEQUAL   Test if DELTAFUN objects F and G are equal.
%   ISEQUAL(F, G) returns TRUE if the DELTAFUN objects F and G have the same
%   underlying FUNPART and the same delta functions.

% Copyright 2017 by The University of Oxford and The Chebfun Developers. 
% See http://www.chebfun.org/ for Chebfun information.

% Get the tolerances:
pref = chebfunpref();
proximityTol = pref.deltaPrefs.proximityTol;
deltaTol = pref.deltaPrefs.deltaTol;

% Assume true be default:
out = 1;

% Trivial cases:
if ( isempty(f) && isempty(g) )

    
function out = isequal(f, g)
%ISEQUAL   Test if DELTAFUN objects F and G are equal.
%   ISEQUAL(F, G) returns TRUE if the DELTAFUN objects F and G have the same
%   underlying FUNPART and the same delta functions.

% Copyright 2017 by The University of Oxford and The Chebfun Developers. 
% See http://www.chebfun.org/ for Chebfun information.

% Get the tolerances:
pref = chebfunpref();
proximityTol = pref.deltaPrefs.proximityTol;
deltaTol = pref.deltaPrefs.deltaTol;

% Assume true be default:
out = 1;

% Trivial cases:
if ( isempty(f) && isempty(g) )
    out = 1;
    return
elseif ( xor(isempty(f), isempty(g)) )
    out = 0;
    return
end