code: def plot_sinc_ir(waveform, cutoff, sample_rate, vol=0.2):
      num_frames = waveform.size(0)
      duration = num_frames / sample_rate
      num_cutoff = cutoff.size(0)
      nyquist = sample_rate / 2
  
      _, axes = plt.subplots(2, 1, sharex=True)
      t = torch.linspace(0, duration, num_frames)
      axes[0].plot(t, waveform)
      axes[0].grid(True)
      axes[1].specgram(waveform, Fs=sample_rate, scale="dB")
      t = torch.linspace(0, duration, num_cutoff)
      axes[1].plot(
          t,
          cutoff * nyquist,
          color="gray",
          linewidth=0.8,
          label="Cutoff Frequency",
          linestyle="--",
      )
      axes[1].legend(loc="upper center")
      axes[1].set_ylim([0, nyquist])
      waveform /= waveform.abs().max()
      return Audio(vol * waveform, rate=sample_rate, normalize=False)
  
imports: import torch
  import torchaudio
  import matplotlib.pyplot
  from IPython.display import Audio
label_desc: Use image node_id 2 for calling a global function with example usage: plot_sinc_ir(waveform, cutoff, sample_rate, vol) and returns: Audio