code: def _plot(feats, num_iter, unit=25):
      unit_dur = segment_length / sample_rate * unit
      num_plots = num_iter // unit + (1 if num_iter % unit else 0)
      fig, axes = plt.subplots(num_plots, 1)
      t0 = 0
      for i, ax in enumerate(axes):
          feats_ = feats[i * unit : (i + 1) * unit]
          t1 = t0 + segment_length / sample_rate * len(feats_)
          feats_ = torch.cat(
              [f[2:-2] for f in feats_]
          )  # remove boundary effect and overlap
          ax.imshow(
              feats_.T,
              extent=[t0, t1, 0, 1],
              aspect="auto",
              origin="lower",
          )
          ax.tick_params(which="both", left=False, labelleft=False)
          ax.set_xlim(t0, t0 + unit_dur)
          t0 = t1
      fig.suptitle("MelSpectrogram Feature")
      plt.tight_layout()
  
file_path: audio/examples/tutorials/online_asr_tutorial.py
imports: import torch
  import torchaudio
  import IPython
  import matplotlib.pyplot
  from torchaudio.io import StreamReader
label_desc: Use image node_id 1 for calling a global function with example usage: _plot(feats, num_iter, unit) without return types