code: def test_from_file(tmp_path: Path):
      with (tmp_path / "tokens.txt").open("w") as f:
          f.write("a\n")
          f.write("b\n")
          f.write("c\n")
          f.write("<unk>\n")
      converter = TokenIDConverter(tmp_path / "tokens.txt")
      assert converter.tokens2ids("abc") == [0, 1, 2]
  
file_path: espnet/test/espnet2/text/test_token_id_converter.py
imports: from pathlib import Path
  import numpy
  import pytest
  from espnet2.text.token_id_converter import TokenIDConverter
label_desc: Use image node_id 4 for calling a global function with example usage: test_from_file(tmp_path) without return types