code: def test_attention(self):
      model_params = dict(
          attention="regular",
          decoder_layer_configs=[
              dict(
                  num_units=32,
              ),
          ],
          encoder_type=dict(
              encoder_layer_configs=[
                  dict(
                      num_units=16,
                  ),
              ],
              use_bidirectional_encoder=True,
          ),
          encoder_embedding_size=8,
          decoder_embedding_size=8,
          decoder_softmax_size=None,
      )
      self._run_compare_train_inference(model_params)
  
file_path: pytorch/caffe2/python/models/seq2seq/seq2seq_beam_search_test.py
imports: import numpy
  import os
  import tempfile
  from caffe2.python import test_util, workspace
  import caffe2.python.models.seq2seq.seq2seq_util
  from caffe2.python.models.seq2seq.train import Seq2SeqModelCaffe2
  from caffe2.python.models.seq2seq.translate import Seq2SeqModelCaffe2EnsembleDecoder
label_desc: Use image node_id 3 for calling the Seq2SeqBeamSearchTest obj's underlying member method code with example usage: obj.test_attention() without return types