code: def test_sound_hdf5_file(self):
      tmpdir = Path(tempfile.mkdtemp())
      for fmt in ["flac", "wav"]:
          valid = {
              "a": np.random.randint(-100, 100, 25, dtype=np.int16),
              "b": np.random.randint(-1000, 1000, 100, dtype=np.int16),
          }
  
          # Note: Specify the file format by extension
          p = tmpdir.joinpath("test.{}.h5".format(fmt))
          p.touch(exist_ok=True)
          p = str(p.resolve())
          f = SoundHDF5File(p, "a")
  
          for k, v in valid.items():
              f[k] = (v, 8000)
  
          for k, v in valid.items():
              t, r = f[k]
              self.assertEqual(r, 8000)
              self.assertAllEqual(t, v)
  
imports: import tempfile
  from pathlib import Path
  import numpy
  import delta.compat
  import h5py
  import kaldiio
  from absl import logging
  from espnet.utils.io_utils import LoadInputsAndTargets
  from espnet.utils.io_utils import SoundHDF5File
  from test.utils_test import make_dummy_json
  from delta import utils
  from delta.data.utils import espnet_utils
  from delta.data.utils.test_utils import generate_json_data
label_desc: Use image node_id 7 for calling the KaldiJsonReaderTest obj's underlying member method code with example usage: obj.test_sound_hdf5_file() without return types