code: def speed_clustering(clf, points, min_time):
      
      # get changepoint indexes
      changepoints = detect_changepoints(points, min_time)
  
      # info for each changepoint
      cp_info = []
  
      for i in range(0, len(changepoints) - 1):
          from_index = changepoints[i]
          to_index = changepoints[i+1]
          info = classify(clf, points[from_index:to_index], min_time, from_index, to_index)
          if info:
              cp_info.append(info)
  
      return group_modes(cp_info)
docs: Transportation mode infering, based on changepoint segmentation
  
      Args:
          clf (:obj:`Classifier`): Classifier to use
          points (:obj:`list` of :obj:`Point`)
          min_time (float): Min time, in seconds, before do another segmentation
      Returns:
          :obj:`list` of :obj:`dict`