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: xASL_quant_BSupCalculation.m
    path of file: ./repos/ExploreASL/Functions/Quantification
    
    the code of the file until where you have to start completion: function SignalPercentage = xASL_quant_BSupCalculation(BackgroundSuppressionPulseTime, ReadoutTime, PresaturationTime, T1Time, SliceTime, PathGraph, bFigureExists)
% xASL_quant_BSupCalculation calculates the percentage of the remaining signal after a Bsup correction
%
% FORMAT: signalPercentage = xASL_quant_BSupCalculation(BackgroundSuppressionPulseTime, ReadoutTime[, PresaturationTime, T1Time, SliceTime, PathGraph])
%
% INPUT:
%   BackgroundSuppressionPulseTime          - time of the BSup pulses (180 degree inversion) in ms and after the start of labeling, vector NBx1 (REQUIRED)
%   ReadoutTime       - time when the readout starts after the start of labeling (REQUIRED)
%   PresaturationTime - time in ms after the s
    
function computes the tissue signal percentage that
%              remains after background suppression pulses are played in the ASL
%              acquisition.
%              It assumes that the signal is, at first, optionally saturated by a 90 degree flip at PresaturationTime before readout.
%              Then follows a series of BSup pulses (times before readout are given) that do a 180 degree flip. The observed tissue relaxes with time
%              T1time and the signal attenuation is calculated for several slices acquired at times relative to the readout. 
%
% -----------------------------------------------------------------------------------------------------------------------------------------------------
% EXAMPLE: signalPercentage = xASL_quant_BSupCalculation([2200 2600], 2700, 1, 1240, [0 30 50 70], '/home/test/graph.jpg')
%
% __________________________________
% Copyright (c) 2015-2021 ExploreASL
 
% Admin
if nargin < 1 || isempty(BackgroundSuppressionPulseTime)
    error('BackgroundSuppressionPulseTime is a required parameter');
end