code: def testLSTMBasicToBlockCellPeeping(self):
      with self.session(use_gpu=True) as sess:
          x = tf.zeros([1, 2])
          x_values = np.random.randn(1, 2)
  
          m0_val = 0.1 * np.ones([1, 2])
          m1_val = -0.1 * np.ones([1, 2])
          m2_val = -0.2 * np.ones([1, 2])
          m3_val = 0.2 * np.ones([1, 2])
  
          initializer = tf.random_uniform_initializer(
              -0.01, 0.01, seed=19890212
          )
          with tf.variable_scope("basic", initializer=initializer):
              m0 = tf.zeros([1, 2])
              m1 = tf.zeros([1, 2])
              m2 = tf.zeros([1, 2])
              m3 = tf.zeros([1, 2])
              g, (
                  (out_m0, out_m1),
                  (out_m2, out_m3),
              ) = rnn_cell.MultiRNNCell(
                  [
                      rnn_cell.LSTMCell(
                          2, use_peepholes=True, state_is_tuple=True
                      )
                      for _ in range(2)
                  ],
                  state_is_tuple=True,
              )(
                  x, ((m0, m1), (m2, m3))
              )
              sess.run([tf.global_variables_initializer()])
              basic_res = sess.run(
                  [g, out_m0, out_m1, out_m2, out_m3],
                  {
                      x.name: x_values,
                      m0.name: m0_val,
                      m1.name: m1_val,
                      m2.name: m2_val,
                      m3.name: m3_val,
                  },
              )
  
          with tf.variable_scope("block", initializer=initializer):
              m0 = tf.zeros([1, 2])
              m1 = tf.zeros([1, 2])
              m2 = tf.zeros([1, 2])
              m3 = tf.zeros([1, 2])
              g, (
                  (out_m0, out_m1),
                  (out_m2, out_m3),
              ) = rnn_cell.MultiRNNCell(
                  [
                      contrib_rnn.LSTMBlockCell(2, use_peephole=True)
                      for _ in range(2)
                  ],
                  state_is_tuple=True,
              )(
                  x, ((m0, m1), (m2, m3))
              )
              sess.run([tf.global_variables_initializer()])
              block_res = sess.run(
                  [g, out_m0, out_m1, out_m2, out_m3],
                  {
                      x.name: x_values,
                      m0.name: m0_val,
                      m1.name: m1_val,
                      m2.name: m2_val,
                      m3.name: m3_val,
                  },
              )
  
          self.assertEqual(len(basic_res), len(block_res))
          for basic, block in zip(basic_res, block_res):
              self.assertAllClose(basic, block)
  
imports: import itertools
  from absl.testing import parameterized
  from magenta.contrib import rnn
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling the LSTMBlockCellTest obj's underlying member method code with example usage: obj.testLSTMBasicToBlockCellPeeping() without return types