docs: def path_fraction_id_offset(points, fraction, relative_offset=False):
      '''Find the segment which corresponds to the fraction
      of the path length along the piecewise linear curve which
      is constructed from the set of points.
  
      Args:
          points: an iterable of indexable objects with indices
          0, 1, 2 correspoding to 3D cartesian coordinates
          fraction: path length fraction (0.0 <= fraction <= 1.0)
          relative_offset: return absolute or relative segment distance
  
      Returns:
          (segment ID, segment offset) pair.
      '''
      if not (0. <= fraction <= 1.0):
          raise ValueError("Invalid fraction: %.3f" % fraction)
      pts = np.array(points)[:, COLS.XYZ]
      lengths = np.linalg.norm(np.diff(pts, axis=0), axis=1)
      cum_lengths = np.cumsum(lengths)
      offset = cum_lengths[-1] * fraction
      seg_id = np.argmin(cum_lengths < offset)
      if seg_id > 0:
          offset -= cum_lengths[seg_id - 1]
      if relative_offset:
          offset /= lengths[seg_id]
      return seg_id, offset