class_docstr: TorchScript-ability Test suite for `sox_io_backend`
class_docstr_tok: ["TorchScript-ability","Test","suite","for","`","sox_io_backend","`"]
code: def test_save_wav(self, dtype, sample_rate, num_channels):
      ts_save_func = torch_script(py_save_func)
  
      expected = get_wav_data(dtype, num_channels, normalize=False)
      py_path = self.get_temp_path(
          f"test_save_py_{dtype}_{sample_rate}_{num_channels}.wav"
      )
      ts_path = self.get_temp_path(
          f"test_save_ts_{dtype}_{sample_rate}_{num_channels}.wav"
      )
      enc, bps = get_enc_params(dtype)
  
      py_save_func(py_path, expected, sample_rate, True, None, enc, bps)
      ts_save_func(ts_path, expected, sample_rate, True, None, enc, bps)
  
      py_data, py_sr = load_wav(py_path, normalize=False)
      ts_data, ts_sr = load_wav(ts_path, normalize=False)
  
      self.assertEqual(sample_rate, py_sr)
      self.assertEqual(sample_rate, ts_sr)
      self.assertEqual(expected, py_data)
      self.assertEqual(expected, ts_data)
  
file_path: audio/test/torchaudio_unittest/backend/sox_io/torchscript_test.py
imports: import itertools
  from typing import Optional
  import torch
  import torchaudio
  from parameterized import parameterized
  from torchaudio_unittest.common_utils import get_wav_data, load_wav, save_wav, skipIfNoExec, skipIfNoSox, sox_utils, TempDirMixin, torch_script, TorchaudioTestCase
  from .common import get_enc_params, name_func
label_desc: Use image node_id 3 for calling the SoxIO obj's underlying member method code with example usage: obj.test_save_wav(dtype, sample_rate, num_channels) without return types