<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def toc(quiet=False):
 r""" Homemade version of matlab tic and toc function, tic starts or resets the clock, toc reports the time since the last call of tic. Parameters quiet : Boolean If False (default) then a message is output to the console. If True the message is not displayed and the elapsed time is returned. See Also -------- tic """

    if '_startTime_for_tictoc' in globals():
        t = _time.time() - _startTime_for_tictoc
        if quiet is False:
            print('Elapsed time in seconds: ', t)
        else:
            return t
    else:
        raise Exception('Start time not set, call tic first')