code: def test_whitespace():
      """
      Test reading a pretrain with an ascii space in it
  
      The vocab word with a space in it should have the correct number
      of dimensions read, with the space converted to nbsp
      """
      test_txt_file = tempfile.NamedTemporaryFile(
          dir=f"{TEST_WORKING_DIR}/out", suffix=".txt", delete=False
      )
      try:
          test_txt_file.write(SPACE_PRETRAIN.encode())
          test_txt_file.close()
  
          pt = pretrain.Pretrain(
              vec_filename=test_txt_file.name, save_to_file=False
          )
          check_embedding(pt.emb)
          assert "unban\xa0mox" in pt.vocab
          # this one also works because of the normalize_unit in vocab.py
          assert "unban mox" in pt.vocab
      finally:
          os.unlink(test_txt_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 10 for calling a global function with example usage: test_whitespace() without return types