code: def detect_changepoints(points, min_time, data_processor=acc_difference):
      
      data = data_processor(points)
      changepoints = pelt(normal_mean(data, np.std(data)), len(data))
      changepoints.append(len(points) - 1)
  
      result = []
      for start, end in pairwise(changepoints):
          time_diff = points[end].time_difference(points[start])
          if time_diff > min_time:
              result.append(start)
  
      # adds the first point
      result.append(0)
      # adds the last changepoint detected
      result.append(len(points) - 1)
      return sorted(list(set(result)))
docs: Detects changepoints on points that have at least a specific duration
  
      Args:
          points (:obj:`Point`)
          min_time (float): Min time that a sub-segmented, bounded by two changepoints, must have
          data_processor (function): Function to extract data to feed to the changepoint algorithm.
              Defaults to `speed_difference`
      Returns:
          :obj:`list` of int: Indexes of changepoints