code: def line_distance_similarity(p1a, p1b, p2a, p2b, T=CLOSE_DISTANCE_THRESHOLD):
      
      d1 = distance_similarity(p1a, p1b, p2a, T=T)
      d2 = distance_similarity(p1a, p1b, p2b, T=T)
      return abs(d1 + d2) * 0.5
docs: Line distance similarity between two line segments
  
      Args:
          p1a ([float, float]): x and y coordinates. Line A start
          p1b ([float, float]): x and y coordinates. Line A end
          p2a ([float, float]): x and y coordinates. Line B start
          p2b ([float, float]): x and y coordinates. Line B end
      Returns:
          float: between 0 and 1. Where 1 is very similar and 0 is completely different