docstr: Saving audio to file-like object works
docstr_tok: ["Saving","audio","to","file-like","object","works"]
code: def _test_fileobj(self, ext):
      """Saving audio to file-like object works"""
      sample_rate = 16000
      path = self.get_temp_path(f"test.{ext}")
  
      subtype = "FLOAT" if ext == "wav" else None
      data = get_wav_data("float32", num_channels=2)
      soundfile.write(
          path, data.numpy().T, sample_rate, subtype=subtype
      )
      expected = soundfile.read(path, dtype="float32")[0]
  
      fileobj = io.BytesIO()
      soundfile_backend.save(fileobj, data, sample_rate, format=ext)
      fileobj.seek(0)
      found, sr = soundfile.read(fileobj, dtype="float32")
  
      assert sr == sample_rate
      self.assertEqual(expected, found, atol=1e-4, rtol=1e-8)
  
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 1 for calling the TestFileObject obj's underlying member method code with example usage: obj._test_fileobj(ext) without return types