python/demos/demo_timestretch.py: add timescale algorithm