code: def drp(points, epsilon):
      
      dmax = 0.0
      index = 0
  
      for i in range(1, len(points)-1):
          dist = point_line_distance(points[i], points[0], points[-1])
          if dist > dmax:
              index = i
              dmax = dist
  
      if dmax > epsilon:
          return drp(points[:index+1], epsilon)[:-1] + drp(points[index:], epsilon)
      else:
          return [points[0], points[-1]]
docs: Douglas ramer peucker
  
      Based on https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm
  
      Args:
          points (:obj:`list` of :obj:`Point`)
          epsilon (float): drp threshold
      Returns:
          :obj:`list` of :obj:`Point`