There was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
name ‘time_valid’ is not defined
Errors like these come up when you use a global variable when it’s sufficient to use a function parameter. Alternatively, use a named constant if this happens. If neither suggestions work, please click my name and message your notebook as an attachment.