code: def test_run(self):
      # 测试能否跑通
      (
          embed,
          src_words_idx,
          tgt_words_idx,
          src_seq_len,
          tgt_seq_len,
      ) = prepare_env()
      for pos_embed in ["learned", "sin"]:
          model = TransformerSeq2SeqModel.build_model(
              src_embed=embed,
              tgt_embed=None,
              pos_embed=pos_embed,
              max_position=20,
              num_layers=2,
              d_model=30,
              n_head=6,
              dim_ff=20,
              dropout=0.1,
              bind_encoder_decoder_embed=True,
              bind_decoder_input_output_embed=True,
          )
  
          output = model(src_words_idx, tgt_words_idx, src_seq_len)
          assert output["pred"].size() == (2, 4, len(embed))
  
      for bind_encoder_decoder_embed in [True, False]:
          tgt_embed = None
          for bind_decoder_input_output_embed in [True, False]:
              if bind_encoder_decoder_embed == False:
                  tgt_embed = embed
  
              model = TransformerSeq2SeqModel.build_model(
                  src_embed=embed,
                  tgt_embed=tgt_embed,
                  pos_embed="sin",
                  max_position=20,
                  num_layers=2,
                  d_model=30,
                  n_head=6,
                  dim_ff=20,
                  dropout=0.1,
                  bind_encoder_decoder_embed=bind_encoder_decoder_embed,
                  bind_decoder_input_output_embed=bind_decoder_input_output_embed,
              )
  
              output = model(src_words_idx, tgt_words_idx, src_seq_len)
              assert output["pred"].size() == (2, 4, len(embed))
  
file_path: fastNLP/tests/models/torch/test_seq2seq_model.py
imports: import pytest
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP import seq_len_to_mask
label_desc: Use image node_id 1 for calling the TestTransformerSeq2SeqModel obj's underlying member method code with example usage: obj.test_run() without return types