code: def spectrogram(audio):
      sr, data = audio
      if len(data.shape) == 2:
          data = np.mean(data, axis=0)
      frequencies, times, spectrogram_data = signal.spectrogram(
          data, sr, window="hamming"
      )
      plt.pcolormesh(times, frequencies, np.log10(spectrogram_data))
      return plt
  
imports: import matplotlib.pyplot
  import numpy
  from scipy import signal
  import gradio
label_desc: Use image node_id 1 for calling a global function with example usage: spectrogram(audio) and returns: plt