code: def center_of_mass(xyz):
      """Center of mass of streamline
  
      Parameters
      ----------
      xyz : array-like shape (N,3)
         array representing x,y,z of N points in a track
  
      Returns
      -------
      com : array shape (3,)
         center of mass of streamline
  
      Examples
      --------
      >>> from dipy.tracking.metrics import center_of_mass
      >>> center_of_mass([])
      Traceback (most recent call last):
         ...
      ValueError: xyz array cannot be empty
      >>> center_of_mass([[1,1,1]])
      array([ 1.,  1.,  1.])
      >>> xyz = np.array([[0,0,0],[1,1,1],[2,2,2]])
      >>> center_of_mass(xyz)
      array([ 1.,  1.,  1.])
      """
      xyz = np.asarray(xyz)
      if xyz.size == 0:
          raise ValueError("xyz array cannot be empty")
      return np.mean(xyz, axis=0)
  
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 6 for calling a global function with example usage: center_of_mass(xyz) and returns: np