code: def test_sound_hdf5_file(tmpdir, fmt):
      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.join("test.{}.h5".format(fmt)).strpath
      f = SoundHDF5File(p, "a")
  
      for k, v in valid.items():
          f[k] = (v, 8000)
  
      for k, v in valid.items():
          t, r = f[k]
          assert r == 8000
          np.testing.assert_array_equal(t, v)
  
file_path: espnet/test/test_utils.py
imports: from test.utils_test import make_dummy_json
  import h5py
  import kaldiio
  import numpy
  import pytest
  from espnet.utils.io_utils import LoadInputsAndTargets, SoundHDF5File
  from espnet.utils.training.batchfy import make_batchset
label_desc: Use image node_id 6 for calling a global function with example usage: test_sound_hdf5_file(tmpdir, fmt) without return types