code: def _calc_relative_path_lengths(self, x, y):
          
  
          path_lengths = np.sqrt(np.diff(x) ** 2 + np.diff(y) ** 2)
          total_length = np.sum(path_lengths)
          cummulative_lengths = np.cumsum(path_lengths)
          relative_path_lengths = cummulative_lengths / total_length
          return relative_path_lengths
docs: Determine the relative path length at each x,y position.