code: def test_resave_pretrain():
      """
      Test saving a pretrain and then loading from the existing file
      """
      test_pt_file = tempfile.NamedTemporaryFile(
          dir=f"{TEST_WORKING_DIR}/out", suffix=".pt", delete=False
      )
      try:
          test_pt_file.close()
          # note that this tests the ability to save a pretrain and the
          # ability to fall back when the existing pretrain isn't working
          pt = pretrain.Pretrain(
              filename=test_pt_file.name,
              vec_filename=f"{TEST_WORKING_DIR}/in/tiny_emb.xz",
          )
          check_pretrain(pt)
  
          pt2 = pretrain.Pretrain(
              filename=test_pt_file.name, vec_filename=f"unban_mox_opal"
          )
          check_pretrain(pt2)
  
          pt3 = torch.load(test_pt_file.name)
          check_embedding(pt3["emb"])
      finally:
          os.unlink(test_pt_file.name)
  
imports: import os
  import tempfile
  import pytest
  import numpy
  import torch
  from stanza.models.common import pretrain
  from stanza.models.common.vocab import UNK_ID
  from stanza.tests import *
label_desc: Use image node_id 9 for calling a global function with example usage: test_resave_pretrain() without return types