Refactor SummarizeTimestamps into sample.py