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=1f 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)
docs: computes mean spectral energy for each variable in a segmented time series