code: def chromagram(
      signal,
      sampling_rate,
      window,
      step,
      plot=False,
      show_progress=False,
  ):
      """
      Short-term FFT mag for spectogram estimation:
      Returns:
          a np array (num_fft x numOfShortTermWindows)
      ARGUMENTS:
          signal:      the input signal samples
          sampling_rate:          the sampling freq (in Hz)
          window:         the short-term window size (in samples)
          step:        the short-term window step (in samples)
          plot:        flag, 1 if results are to be ploted
      RETURNS:
      """
      window = int(window)
      step = int(step)
      signal = np.double(signal)
      signal = signal / (2.0**15)
      signal = dc_normalize(signal)
  
      num_samples = len(signal)  # total number of signals
      count_fr = 0
      num_fft = int(window / 2)
      chromogram = np.zeros(
          (int((num_samples - step - window) / step) + 1, 12),
          dtype=np.float64,
      )
      for cur_p in tqdm(
          range(window, num_samples - step, step),
          disable=not show_progress,
      ):
          count_fr += 1
          x = signal[cur_p : cur_p + window]
          X = abs(fft(x))
          X = X[0:num_fft]
          X = X / len(X)
          chroma_names, chroma_feature_matrix = chroma_features(
              X, sampling_rate, num_fft
          )
          chroma_feature_matrix = chroma_feature_matrix[:, 0]
          chromogram[count_fr - 1, :] = chroma_feature_matrix.T
      freq_axis = chroma_names
      time_axis = [
          (t * step) / sampling_rate for t in range(chromogram.shape[0])
      ]
  
      if plot:
          fig, ax = plt.subplots()
          chromogram_plot = chromogram.transpose()[::-1, :]
          ratio = int(
              chromogram_plot.shape[1] / (3 * chromogram_plot.shape[0])
          )
          if ratio < 1:
              ratio = 1
          chromogram_plot = np.repeat(chromogram_plot, ratio, axis=0)
          imgplot = plt.imshow(chromogram_plot)
  
          ax.set_yticks(
              range(int(ratio / 2), len(freq_axis) * ratio, ratio)
          )
          ax.set_yticklabels(freq_axis[::-1])
          t_step = int(count_fr / 3)
          time_ticks = range(0, count_fr, t_step)
          time_ticks_labels = [
              "%.2f" % (float(t * step) / sampling_rate)
              for t in time_ticks
          ]
          ax.set_xticks(time_ticks)
          ax.set_xticklabels(time_ticks_labels)
          ax.set_xlabel("time (secs)")
          imgplot.set_cmap("jet")
          plt.colorbar()
          plt.show()
  
      return chromogram, time_axis, freq_axis
  
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 14 for calling a global function with example usage: chromagram(signal, sampling_rate, window, step, plot, show_progress) and returns: chromogram,  time_axis,  freq_axis