code: def _retain_centroids(numbers, thres):
      
      numbers.sort()
      prev = -1
      ret = []
      for n in numbers:
          if prev < 0 or n - prev > thres:
              ret.append(n)
              prev = n
      return ret
docs: Only keep one number for each cluster within thres of each other