code: def section_end_distance(section):
      '''End to end distance of a section
  
      The end to end distance of a section is defined as
      the euclidian distnce between its end points.
  
      If the section contains less than 2 points, the value 0 is returned.
      '''
      pts = section.points
      return 0 if len(pts) < 2 else mm.point_dist(pts[-1], pts[0]f section_end_distance(section):
      '''End to end distance of a section
  
      The end to end distance of a section is defined as
      the euclidian distnce between its end points.
  
      If the section contains less than 2 points, the value 0 is returned.
      '''
      pts = section.points
      return 0 if len(pts) < 2 else mm.point_dist(pts[-1], pts[0])
docs: End to end distance of a section
  
      The end to end distance of a section is defined as
      the euclidian distnce between its end points.
  
      If the section contains less than 2 points, the value 0 is returned.