https://github.com/ipeaGIT/gtfstools/blob/8fda9f289bfddfc79ecd4559992c68bea3d31426/R/get_stop_times_patterns.R