code: def energy_entropy(frame, n_short_blocks=10):
      """Computes entropy of energy"""
      # total frame energy
      frame_energy = np.sum(frame**2)
      frame_length = len(frame)
      sub_win_len = int(np.floor(frame_length / n_short_blocks))
      if frame_length != sub_win_len * n_short_blocks:
          frame = frame[0 : sub_win_len * n_short_blocks]
  
      # sub_wins is of size [n_short_blocks x L]
      sub_wins = frame.reshape(
          sub_win_len, n_short_blocks, order="F"
      ).copy()
  
      # Compute normalized sub-frame energies:
      s = np.sum(sub_wins**2, axis=0) / (frame_energy + eps)
  
      # Compute entropy of the normalized sub-frame energies:
      entropy = -np.sum(s * np.log2(s + eps))
      return entropy
  
imports: from __future__ import print_function
  import math
  import numpy
  import sys
  from scipy.fftpack import fft
  import matplotlib.pyplot
  from scipy.signal import lfilter
  from scipy.fftpack.realtransforms import dct
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: energy_entropy(frame, n_short_blocks) and returns: entropy