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: determineProbeSpacing.m
    path of file: ./repos/CellExplorer/calc_CellMetrics
    
    the code of the file until where you have to start completion: function session = determineProbeSpacing(session)

% Loads verticalSpacing and layout from session struct
%     VerticalSpacing = session.extracellular.chanCoords.verticalSpacing;
%     layout = session.extracellular.chanCoords.layout;
% else
% If no probesVerticalSpacing or probesLayout is given, it will try to load the information from the database


if ~isempty(session.animal.probeImplants)
    % Get the probe type from the session struct
    SiliconProbes = session.animal.probeImplants{1};

    
function session = determineProbeSpacing(session)

% Loads verticalSpacing and layout from session struct
%     VerticalSpacing = session.extracellular.chanCoords.verticalSpacing;
%     layout = session.extracellular.chanCoords.layout;
% else
% If no probesVerticalSpacing or probesLayout is given, it will try to load the information from the database


if ~isempty(session.animal.probeImplants)
    % Get the probe type from the session struct
    SiliconProbes = session.animal.probeImplants{1};
else
    % if no probe information is given in the session struct, it tries
    % to get the probe type from probe implants in the database
    probeimplants = struct2cell(db_load_table('probeimplants',session.animal.name));
    SiliconProbes = cellstr(string(probeimplants{1}.DynamicProbeLayout));
end