code: def winding(xyz):
      """Total turning angle projected.
  
      Project space curve to best fitting plane. Calculate the cumulative signed
      angle between each line segment and the previous one.
  
      Parameters
      ----------
      xyz : array-like shape (N,3)
          Array representing x,y,z of N points in a track.
  
      Returns
      -------
      a : scalar
          Total turning angle in degrees.
  
      """
  
      U, s, V = np.linalg.svd(xyz - np.mean(xyz, axis=0), 0)
      proj = np.dot(U[:, 0:2], np.diag(s[0:2]))
  
      turn = 0
      for j in range(len(xyz) - 1):
          v0 = proj[j]
          v1 = proj[j + 1]
          v = np.dot(v0, v1) / (np.linalg.norm(v0) * np.linalg.norm(v1))
          v = np.clip(v, -1, 1)
          tmp = np.arccos(v)
          turn += tmp
  
      return np.rad2deg(turn)
  
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 1 for calling a global function with example usage: winding(xyz) and returns: np