code: def mse(X):
      """computes mean spectral energy for each variable in a segmented time series"""
      return np.mean(np.square(np.abs(np.fft.fft(X, axis=1))), axis=1)
  
imports: import numpy
  from scipy import stats
label_desc: Use image node_id 22 for calling a global function with example usage: mse(X) and returns: np