code: def wavelet_entropy(
      signal, function=scipy.signal.ricker, widths=np.arange(1, 10)
  ):
      """Computes CWT entropy of the signal.
  
      Implementation details in:
      https://dsp.stackexchange.com/questions/13055/how-to-calculate-cwt-shannon-entropy
      B.F. Yan, A. Miyamoto, E. Bruhwiler, Wavelet transform-based modal parameter identification considering uncertainty
  
      Feature computational cost: 2
  
      Parameters
      ----------
      signal : nd-array
          Input from which CWT is computed
      function :  wavelet function
          Default: scipy.signal.ricker
      widths :  nd-array
          Widths to use for transformation
          Default: np.arange(1,10)
  
      Returns
      -------
      float
          wavelet entropy
  
      """
      if np.sum(signal) == 0:
          return 0.0
  
      cwt = wavelet(signal, function, widths)
      energy_scale = np.sum(np.abs(cwt), axis=1)
      t_energy = np.sum(energy_scale)
      prob = energy_scale / t_energy
      w_entropy = -np.sum(prob * np.log(prob))
  
      return w_entropy
  
imports: import scipy.signal
  from tsfel.feature_extraction.features_utils import *
label_desc: Use image node_id 57 for calling a global function with example usage: wavelet_entropy(signal, function, widths) and returns: w_entropy, int