Convert Samples into Event Intervals | Anthropic Coding Question