code: def test_from_params_requires_batch_first(self):
      params = Params({"type": "lstm", "batch_first": False})
      with pytest.raises(ConfigurationError):
          Seq2SeqEncoder.from_params(params)
  
file_path: allennlp/tests/modules/seq2seq_encoder_test.py
imports: import pytest
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.modules import Seq2SeqEncoder
  from allennlp.common.testing import AllenNlpTestCase
label_desc: Use image node_id 2 for calling the TestSeq2SeqEncoder obj's underlying member method code with example usage: obj.test_from_params_requires_batch_first() without return types