code: def test_train(self):
      (
          embed,
          src_words_idx,
          tgt_words_idx,
          src_seq_len,
          tgt_seq_len,
      ) = prepare_env()
  
      model = LSTMSeq2SeqModel.build_model(
          src_embed=embed,
          tgt_embed=None,
          num_layers=1,
          hidden_size=20,
          dropout=0.1,
          bind_encoder_decoder_embed=True,
          bind_decoder_input_output_embed=True,
      )
  
      right_count = train_model(
          model, src_words_idx, tgt_words_idx, tgt_seq_len, src_seq_len
      )
      assert right_count == tgt_words_idx.nelement()
  
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 2 for calling the TestLSTMSeq2SeqModel obj's underlying member method code with example usage: obj.test_train() without return types