code: def test_cell_output():
      x = tf.ones([1, 2], dtype=tf.float32)
      c0 = tf.constant(0.1 * np.asarray([[0, 1]]), dtype=tf.float32)
      h0 = tf.constant(0.1 * np.asarray([[2, 3]]), dtype=tf.float32)
      state0 = [h0, c0]
      c1 = tf.constant(0.1 * np.asarray([[4, 5]]), dtype=tf.float32)
      h1 = tf.constant(0.1 * np.asarray([[6, 7]]), dtype=tf.float32)
      state1 = [h1, c1]
      state = (state0, state1)
      const_initializer = tf.constant_initializer(0.5)
  
      def single_cell():
          return LayerNormLSTMCell(
              units=2,
              kernel_initializer=const_initializer,
              recurrent_initializer=const_initializer,
              bias_initializer=const_initializer,
              norm_epsilon=1e-12,
          )
  
      cell = keras.layers.StackedRNNCells(
          [single_cell() for _ in range(2)]
      )
      output_v, output_states_v = cell(x, state)
  
      expected_output = np.array([[-0.47406167, 0.47406143]])
      expected_state0_c = np.array([[-1.0, 1.0]])
      expected_state0_h = np.array([[-0.47406167, 0.47406143]])
      expected_state1_c = np.array([[-1.0, 1.0]])
      expected_state1_h = np.array([[-0.47406167, 0.47406143]])
  
      actual_state0_h = output_states_v[0][0]
      actual_state0_c = output_states_v[0][1]
      actual_state1_h = output_states_v[1][0]
      actual_state1_c = output_states_v[1][1]
  
      np.testing.assert_allclose(output_v, expected_output, 1e-5)
      np.testing.assert_allclose(
          expected_state0_c, actual_state0_c, 1e-5
      )
      np.testing.assert_allclose(
          expected_state0_h, actual_state0_h, 1e-5
      )
      np.testing.assert_allclose(
          expected_state1_c, actual_state1_c, 1e-5
      )
      np.testing.assert_allclose(
          expected_state1_h, actual_state1_h, 1e-5
      )
  
      # Test BasicLSTMCell with input_size != num_units.
      x = tf.ones([1, 3], dtype=tf.float32)
      c = tf.constant(0.1 * np.asarray([[0, 1]]), dtype=tf.float32)
      h = tf.constant(0.1 * np.asarray([[2, 3]]), dtype=tf.float32)
      state = [h, c]
      cell = LayerNormLSTMCell(
          units=2,
          kernel_initializer=const_initializer,
          recurrent_initializer=const_initializer,
          bias_initializer=const_initializer,
          norm_epsilon=1e-12,
      )
      output_v, output_states_v = cell(x, state)
      expected_h = np.array([[-0.47406167, 0.47406143]])
      expected_c = np.array([[-1.0, 1.0]])
      np.testing.assert_allclose(output_v, expected_h, 1e-5)
      np.testing.assert_allclose(output_states_v[0], expected_h, 1e-5)
      np.testing.assert_allclose(output_states_v[1], expected_c, 1e-5)
  
file_path: addons/tensorflow_addons/rnn/tests/layer_norm_lstm_cell_test.py
imports: import pytest
  from packaging.version import Version
  import numpy
  import tensorflow
  import tensorflow.keras
  from tensorflow_addons.rnn import LayerNormLSTMCell
label_desc: Use image node_id 1 for calling a global function with example usage: test_cell_output() and returns: LayerNormLSTMCell