code: def _plot(data):
      ax.clear()
      x = list(range(len(data)))
      R, G, B = 238 / 255, 76 / 255, 44 / 255
      for coeff, alpha in [(0.8, 0.7), (1, 1)]:
          d = data**coeff
          ax.fill_between(x, d, -d, color=[R, G, B, alpha])
      xlim = n_fft // 2 + 1
      ax.set_xlim([-1, n_fft // 2 + 1])
      ax.set_ylim([-1, 1])
      ax.text(
          xlim,
          0.95,
          f"Created with TorchAudio\n{torchaudio.__version__}",
          color="white",
          ha="right",
          va="top",
          backgroundcolor="black",
      )
      fig.canvas.draw()
      frame = torch.frombuffer(
          fig.canvas.tostring_rgb(), dtype=torch.uint8
      )
      return frame.reshape(nrows, ncols, 3).permute(2, 0, 1)
  
file_path: audio/examples/tutorials/streamwriter_basic_tutorial.py
imports: import torch
  import torchaudio
  from torchaudio.io import StreamWriter
  import io
  import os
  import tempfile
  from IPython.display import Audio, Video
  from torchaudio.utils import download_asset
  import matplotlib.pyplot
  import torchaudio.transforms
label_desc: Use image node_id 2 for calling a global function with example usage: _plot(data) and returns: frame