code: def test_vi_embedding():
      """
      Test that a VI embedding's words are correctly found when processing trees
      """
      text = VI_TREEBANK.split("\n")[0]
      trees = tree_reader.read_trees(text)
      words = set(trees[0].leaf_labels())
  
      with tempfile.TemporaryDirectory() as tempdir:
          emb_filename = os.path.join(tempdir, "emb.txt")
          pt_filename = os.path.join(tempdir, "emb.pt")
          with open(emb_filename, "w", encoding="utf-8") as fout:
              fout.write(VI_EMBEDDING)
          pt = pretrain.Pretrain(
              filename=pt_filename,
              vec_filename=emb_filename,
              save_to_file=True,
          )
          pt.load()
  
          trainer = build_trainer(pt_filename)
          model = trainer.model
  
      assert model.num_words_known(words) == 4
  
file_path: stanza/stanza/tests/constituency/test_vietnamese.py
imports: import os
  import tempfile
  import pytest
  from stanza.models.common import pretrain
  from stanza.models.constituency import tree_reader
  from stanza.tests.constituency.test_trainer import build_trainer
label_desc: Use image node_id 2 for calling a global function with example usage: test_vi_embedding() without return types