code: def distance_to_line(a, b, p):
      
      return distance(closest_point(a, b, p), p)
docs: Closest distance between a line segment and a point
  
      Args:
          a ([float, float]): x and y coordinates. Line start
          b ([float, float]): x and y coordinates. Line end
          p ([float, float]): x and y coordinates. Point to compute the distance
      Returns:
          float