code: def test_SoundScpWriter(tmp_path: Path):
      audio1 = np.random.randint(-100, 100, 16, dtype=np.int16)
      audio2 = np.random.randint(-100, 100, 16, dtype=np.int16)
      with SoundScpWriter(tmp_path, tmp_path / "wav.scp") as writer:
          writer["abc"] = 16, audio1
          writer["def"] = audio2, 16
          # Unsupported dimension
          with pytest.raises(RuntimeError):
              y = np.random.randint(-100, 100, [16, 1, 1])
              writer["ghi"] = 16, y
          with pytest.raises(ValueError):
              writer["ghi"] = [None, None, None]
          with pytest.raises(TypeError):
              writer["ghi"] = None, None
      target = SoundScpReader(tmp_path / "wav.scp", dtype=np.int16)
      desired = {"abc": (16, audio1), "def": (16, audio2)}
  
      for k in desired:
          rate1, t = target[k]
          rate2, d = desired[k]
          assert rate1 == rate2
          np.testing.assert_array_equal(t, d)
  
      assert writer.get_path("abc") == str(tmp_path / "abc.wav")
      assert writer.get_path("def") == str(tmp_path / "def.wav")
  
file_path: espnet/test/espnet2/fileio/test_sound_scp.py
imports: from pathlib import Path
  import numpy
  import pytest
  import soundfile
  from espnet2.fileio.sound_scp import SoundScpReader, SoundScpWriter
label_desc: Use image node_id 4 for calling a global function with example usage: test_SoundScpWriter(tmp_path) without return types