def METHOD_NAME(
    self, event_pairs: List[List[CBEvent]]
) -> EventStats:
    """Calculate time-based stats for a set of event pairs"""
    total_secs = 0.0
    for event_pair in event_pairs:
        start_time = datetime.strptime(event_pair[0].time, TIMESTAMP_FORMAT)
        end_time = datetime.strptime(event_pair[-1].time, TIMESTAMP_FORMAT)
        total_secs += (end_time - start_time).total_seconds()
    stats = EventStats(
        total_secs=total_secs,
        average_secs=total_secs / len(event_pairs),
        total_count=len(event_pairs),
    )
    return stats