code: def extract_features(points, n_tops):
      
      max_bin = -1
      for point in points:
          max_bin = max(max_bin, point.vel)
      max_bin = int(round(max_bin)) + 1
  
      # inits histogram
      histogram = [0] * max_bin
      time = 0
  
      # fills histogram
      for point in points:
          bin_index = int(round(point.vel))
          histogram[bin_index] += point.dt
          time += point.dt
  
      result = []
      if time == 0:
          return result
  
      for _ in range(n_tops):
          max_index = np.argmax(histogram)
          value = histogram[max_index] / time
          result.extend([max_index, value])
          histogram[max_index] = -1
  
      return result
docs: Feature extractor
  
      Args:
          points (:obj:`list` of :obj:`Point`)
          n_tops (int): Number of top speeds to extract
      Returns:
          :obj:`list` of float: with length (n_tops*2). Where the ith even element
              is the ith top speed and the i+1 element is the percentage of time
              spent on that speed