Time Range Python Function Example