docstr: `soundfile_backend.save` can save non-wav format.
  
  Due to precision missmatch, and the lack of alternative way to decode the
  resulting files without using soundfile, only meta data are validated.
docstr_tok: ["`","soundfile_backend.save","`","can","save","non-wav","format",".","Due","to","precision","missmatch",",","and","the","lack","of","alternative","way","to","decode","the","resulting","files","without","using","soundfile",",","only","meta","data","are","validated","."]
code: def _assert_non_wav(self, fmt, dtype, sample_rate, num_channels):
      """`soundfile_backend.save` can save non-wav format.
  
      Due to precision missmatch, and the lack of alternative way to decode the
      resulting files without using soundfile, only meta data are validated.
      """
      num_frames = sample_rate * 3
      path = self.get_temp_path(f"data.{fmt}")
      expected = get_wav_data(
          dtype, num_channels, num_frames=num_frames, normalize=False
      )
      soundfile_backend.save(path, expected, sample_rate)
      sinfo = soundfile.info(path)
      assert sinfo.format == fmt.upper()
      assert sinfo.frames == num_frames
      assert sinfo.channels == num_channels
      assert sinfo.samplerate == sample_rate
  
imports: import io
  from unittest.mock import patch
  from torchaudio._internal import module_utils
  from torchaudio.backend import soundfile_backend
  from torchaudio_unittest.common_utils import get_wav_data, load_wav, nested_params, PytorchTestCase, skipIfNoModule, TempDirMixin
  from .common import fetch_wav_subtype, parameterize, skipIfFormatNotSupported
label_desc: Use image node_id 2 for calling the SaveTestBase obj's underlying member method code with example usage: obj._assert_non_wav(fmt, dtype, sample_rate, num_channels) without return types