class_docstr: Tests the StackBidirectionalRNNEncoder class.
class_docstr_tok: ["Tests","the","StackBidirectionalRNNEncoder","class","."]
code: def test_encode_with_multi_cell(self):
      encoder_output_ = self._test_encode_with_params(
          {
              "rnn_cell": {
                  "num_layers": 4,
                  "cell_params": {"num_units": 32},
              }
          }
      )
  
      for layer_idx in range(4):
          self.assertIsInstance(
              encoder_output_.final_state[0][layer_idx],
              tf.contrib.rnn.LSTMStateTuple,
          )
          self.assertIsInstance(
              encoder_output_.final_state[1][layer_idx],
              tf.contrib.rnn.LSTMStateTuple,
          )
          np.testing.assert_array_equal(
              encoder_output_.final_state[0][layer_idx].h.shape,
              [self.batch_size, 32],
          )
          np.testing.assert_array_equal(
              encoder_output_.final_state[0][layer_idx].c.shape,
              [self.batch_size, 32],
          )
          np.testing.assert_array_equal(
              encoder_output_.final_state[1][layer_idx].h.shape,
              [self.batch_size, 32],
          )
          np.testing.assert_array_equal(
              encoder_output_.final_state[1][layer_idx].c.shape,
              [self.batch_size, 32],
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tensorflow
  import numpy
  from seq2seq.encoders import rnn_encoder
label_desc: Use image node_id 4 for calling the StackBidirectionalRNNEncoderTest obj's underlying member method code with example usage: obj.test_encode_with_multi_cell() without return types