code: def write_audio(filepath, audio, samplerate):
      """Write audio on disk. It is basically a wrapper to support saving
      audio signals in the speechbrain format (audio, channels).
  
      Arguments
      ---------
      filepath: path
          Path where to save the audio file.
      audio : torch.Tensor
          Audio file in the expected speechbrain format (signal, channels).
      samplerate: int
          Sample rate (e.g., 16000).
  
  
      Example
      -------
      >>> import os
      >>> tmpfile = str(getfixture('tmpdir') / "wave.wav")
      >>> dummywav = torch.rand(16000, 2)
      >>> write_audio(tmpfile, dummywav, 16000)
      >>> loaded = read_audio(tmpfile)
      >>> loaded.allclose(dummywav,atol=1e-4) # replace with eq with sox_io backend
      True
      """
      if len(audio.shape) == 2:
          audio = audio.transpose(0, 1)
      elif len(audio.shape) == 1:
          audio = audio.unsqueeze(0)
  
      torchaudio.save(filepath, audio, samplerate)
  
imports: import os
  import torch
  import logging
  import numpy
  import pickle
  import hashlib
  import csv
  import time
  import torchaudio
  import json
  import re
  from speechbrain.utils.torch_audio_backend import check_torchaudio_backend
label_desc: Use image node_id 7 for calling a global function with example usage: write_audio(filepath, audio, samplerate) without return types