Create consecutive_threshold.py