code: def interevent_time(records):
      
      inter_events = pairwise(r.datetime for r in records)
      inter = [(new - old).total_seconds() for old, new in inter_events]
  
      return summary_stats(inter)
docs: The interevent time between two records of the user.