code: def _extrap(xyz, cumlen, distance):
      """Helper function for extrapolate"""
      ind = np.where((cumlen - distance) > 0)[0][0]
      len0 = cumlen[ind - 1]
      len1 = cumlen[ind]
      Ds = distance - len0
      Lambda = Ds / (len1 - len0)
      return Lambda * xyz[ind] + (1 - Lambda) * xyz[ind - 1]
  
imports: from dipy.utils.deprecator import deprecate_with_version
  from dipy.tracking.streamline import set_number_of_points
  import numpy
  from scipy.interpolate import splprep, splev
label_desc: Use image node_id 20 for calling a global function with example usage: _extrap(xyz, cumlen, distance) and returns: unknown