code: def prepare_env():
      vocab = Vocabulary().add_word_lst("This is a test .".split())
      vocab.add_word_lst("Another test !".split())
      embed = StaticEmbedding(
          vocab, model_dir_or_name=None, embedding_dim=5
      )
  
      src_words_idx = [[3, 1, 2], [1, 2]]
      # tgt_words_idx = [[1, 2, 3, 4], [2, 3]]
      src_seq_len = [3, 2]
      # tgt_seq_len = [4, 2]
  
      ds = DataSet(
          {
              "src_tokens": src_words_idx,
              "src_seq_len": src_seq_len,
              "tgt_tokens": src_words_idx,
              "tgt_seq_len": src_seq_len,
          }
      )
  
      dl = TorchDataLoader(ds, batch_size=32)
      return embed, dl
  
file_path: fastNLP/tests/models/torch/test_seq2seq_generator.py
imports: import pytest
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP import Vocabulary, DataSet
  from fastNLP import Trainer, Accuracy
  from fastNLP import Callback, TorchDataLoader
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_env() and returns: embed,  dl