code: def test_pack_unpack(tmp_path: Path, type):
      files = {"abc": str(tmp_path / "foo.pth")}
      with (tmp_path / "foo.pth").open("w"):
          pass
      with (tmp_path / "bar.yaml").open("w") as f:
          # I dared to stack "/" to test
          yaml.safe_dump({"a": str(tmp_path / "//foo.pth")}, f)
      with (tmp_path / "a").open("w"):
          pass
      (tmp_path / "b").mkdir(parents=True, exist_ok=True)
      with (tmp_path / "b" / "a").open("w"):
          pass
  
      pack(
          files=files,
          yaml_files={"def": str(tmp_path / "bar.yaml")},
          option=[tmp_path / "a", tmp_path / "b" / "a"],
          outpath=str(tmp_path / f"out.{type}"),
      )
  
      retval = unpack(str(tmp_path / f"out.{type}"), str(tmp_path))
      # Retry unpack. If cache file exists, generate dict from it
      retval2 = unpack(str(tmp_path / f"out.{type}"), str(tmp_path))
      assert retval == {
          "abc": str(tmp_path / tmp_path / "foo.pth"),
          "def": str(tmp_path / tmp_path / "bar.yaml"),
      }
      assert retval2 == {
          "abc": str(tmp_path / tmp_path / "foo.pth"),
          "def": str(tmp_path / tmp_path / "bar.yaml"),
      }
  
file_path: espnet/test/espnet2/main_funcs/test_pack_funcs.py
imports: import tarfile
  from pathlib import Path
  import pytest
  import yaml
  from espnet2.main_funcs.pack_funcs import find_path_and_change_it_recursive, pack, unpack
label_desc: Use image node_id 2 for calling a global function with example usage: test_pack_unpack(tmp_path, type) without return types