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: arDeleteGraphicsHandles.m
    path of file: ./repos/d2d/arFramework3/Subfunctions
    
    the code of the file until where you have to start completion: % argout = arDeleteGraphicsHandles(ar2)
% This function deletes the graphcis handles in ar which are
% since R2014b objects that are displayed when loaded in a workspace.
%
% This function prevents this.
%
% The function can also be used to open new figures when calling arPlot a
% second time, e.g. usefull for a fast comparison of differnt parameter
% sets. 
%
% arPlot; arPlot 
% -> Second arPlot plots results in the same figure.
% arPlot; arDeleteGraphicsHandles; arPlot 
% -> All figures are opened twice.

f
    
function deletes the graphcis handles in ar which are
% since R2014b objects that are displayed when loaded in a workspace.
%
% This function prevents this.
%
% The function can also be used to open new figures when calling arPlot a
% second time, e.g. usefull for a fast comparison of differnt parameter
% sets. 
%
% arPlot; arPlot 
% -> Second arPlot plots results in the same figure.
% arPlot; arDeleteGraphicsHandles; arPlot 
% -> All figures are opened twice.

function argout = arDeleteGraphicsHandles(ar2)

global ar
if nargin == 0 % in arSave a local copy of the ar-struct is saved and the global struct remains unchanged.  
    ar2 = ar;
end