code: def spectral_entropy(signal, fs):
      """Computes the spectral entropy of the signal based on Fourier transform.
  
      Feature computational cost: 1
  
      Parameters
      ----------
      signal : nd-array
          Input from which spectral entropy is computed
      fs : float
          Sampling frequency
  
      Returns
      -------
      float
          The normalized spectral entropy value
  
      """
      # Removing DC component
      sig = signal - np.mean(signal)
  
      f, fmag = calc_fft(sig, fs)
  
      power = fmag**2
  
      if power.sum() == 0:
          return 0.0
  
      prob = np.divide(power, power.sum())
  
      prob = prob[prob != 0]
  
      # If probability all in one value, there is no entropy
      if prob.size == 1:
          return 0.0
  
      return -np.multiply(prob, np.log2(prob)).sum() / np.log2(
          prob.size
      )
  
imports: import scipy.signal
  from tsfel.feature_extraction.features_utils import *
label_desc: Use image node_id 56 for calling a global function with example usage: spectral_entropy(signal, fs) and returns: unknown, int, int