docstr: `soundfile_backend.load` can load SPHERE format correctly.
docstr_tok: ["`","soundfile_backend.load","`","can","load","SPHERE","format","correctly","."]
code: def assert_sphere(
      self,
      dtype,
      sample_rate,
      num_channels,
      channels_first=True,
      duration=1,
  ):
      """`soundfile_backend.load` can load SPHERE format correctly."""
      path = self.get_temp_path("reference.sph")
      num_frames = duration * sample_rate
      raw = get_wav_data(
          dtype,
          num_channels,
          num_frames=num_frames,
          normalize=False,
          channels_first=False,
      )
      soundfile.write(
          path,
          raw,
          sample_rate,
          subtype=dtype2subtype(dtype),
          format="NIST",
      )
      expected = normalize_wav(raw.t() if channels_first else raw)
      data, sr = self._load(path, channels_first=channels_first)
      assert sr == sample_rate
      self.assertEqual(data, expected, atol=1e-4, rtol=1e-8)
  
imports: import os
  import tarfile
  from functools import partial
  from unittest.mock import patch
  import torch
  from parameterized import parameterized
  from torchaudio._backend.utils import get_load_func
  from torchaudio._internal import module_utils
  from torchaudio_unittest.common_utils import get_wav_data, load_wav, normalize_wav, PytorchTestCase, save_wav, skipIfNoModule, TempDirMixin
  from .common import dtype2subtype, parameterize, skipIfFormatNotSupported
label_desc: Use image node_id 2 for calling the LoadTestBase obj's underlying member method code with example usage: obj.assert_sphere(dtype, sample_rate, num_channels, channels_first, duration) without return types