code: def test_sequential_index(self):
      # 当不存在no_create_entry时，words_to_words应该是顺序的
      vocab = Vocabulary().add_word_lst(
          ["The", "a", "notinfile1", "A", "notinfile2", "notinfile2"]
      )
      embed = StaticEmbedding(
          vocab,
          model_dir_or_name=tests_folder
          + "/helpers/data/embedding/small_static_embedding/"
          "glove.6B.50d_test.txt",
      )
      for index, i in enumerate(embed.words_to_words):
          assert index == i
  
      embed_dict = read_static_embed(
          tests_folder
          + "/helpers/data/embedding/small_static_embedding/"
          "glove.6B.50d_test.txt"
      )
  
      for word, index in vocab:
          if word in embed_dict:
              index = vocab.to_index(word)
              v1 = embed(torch.LongTensor([index])).tolist()[0]
              v2 = embed_dict[word]
              for v1i, v2i in zip(v1, v2):
                  assert np.allclose(v1i, v2i)
  
file_path: fastNLP/tests/embeddings/torch/test_static_embedding.py
imports: import pytest
  import os
  from fastNLP.embeddings.torch import StaticEmbedding
  from fastNLP import Vocabulary
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  import numpy
label_desc: Use image node_id 5 for calling the TestLoad obj's underlying member method code with example usage: obj.test_sequential_index() without return types