Time Delay Function In Python Definition