docstr: When format is WAV or NIST, normalize=False will return the native dtype Tensor, otherwise float32
code: def assert_dtype(
      self,
      ext,
      dtype,
      sample_rate,
      num_channels,
      normalize,
      channels_first,
  ):
      """When format is WAV or NIST, normalize=False will return the native dtype Tensor, otherwise float32"""
      num_frames = 3 * sample_rate
      path = _get_mock_path(
          ext, dtype, sample_rate, num_channels, num_frames
      )
      expected_dtype = (
          torch.float32
          if normalize or ext not in ["wav", "nist"]
          else getattr(torch, dtype)
      )
      with patch("soundfile.SoundFile", SoundFileMock):
          found, sr = soundfile_backend.load(
              path, normalize=normalize, channels_first=channels_first
          )
          assert found.dtype == expected_dtype
          assert sample_rate == sr
  
imports: import os
  import tarfile
  from unittest.mock import patch
  import torch
  from parameterized import parameterized
  from torchaudio._internal import module_utils
  from torchaudio.backend import soundfile_backend
  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 1 for calling the MockedLoadTest obj's underlying member method code with example usage: obj.assert_dtype(ext, dtype, sample_rate, num_channels, normalize, channels_first) without return types