class_docstr: TorchScript-ability Test suite for `sox_io_backend`
class_docstr_tok: ["TorchScript-ability","Test","suite","for","`","sox_io_backend","`"]
docstr: `sox_io_backend.load` is torchscript-able and returns the same result
docstr_tok: ["`","sox_io_backend.load","`","is","torchscript-able","and","returns","the","same","result"]
code: def test_load_wav(
      self, dtype, sample_rate, num_channels, normalize, channels_first
  ):
      """`sox_io_backend.load` is torchscript-able and returns the same result"""
      audio_path = self.get_temp_path(
          f"test_load_{dtype}_{sample_rate}_{num_channels}_{normalize}.wav"
      )
      data = get_wav_data(
          dtype,
          num_channels,
          normalize=False,
          num_frames=1 * sample_rate,
      )
      save_wav(audio_path, data, sample_rate)
  
      ts_load_func = torch_script(py_load_func)
  
      py_data, py_sr = py_load_func(
          audio_path, normalize=normalize, channels_first=channels_first
      )
      ts_data, ts_sr = ts_load_func(
          audio_path, normalize=normalize, channels_first=channels_first
      )
  
      self.assertEqual(py_sr, ts_sr)
      self.assertEqual(py_data, 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 2 for calling the SoxIO obj's underlying member method code with example usage: obj.test_load_wav(dtype, sample_rate, num_channels, normalize, channels_first) without return types