code: def test_lstm_cpu_inference():
      # should behave the same as lstm cell
      EXPECTED_LSTM_OUTPUT = np.array(
          [
              [
                  [0.72045636, 0.72045636, 0.95215213, 0.95215213],
                  [0.72045636, 0.72045636, 0.95215213, 0.95215213],
              ],
              [
                  [0.95215213, 0.95215213, 0.72045636, 0.72045636],
                  [0.95215213, 0.95215213, 0.72045636, 0.72045636],
              ],
          ]
      )
      x = mx.np.ones(shape=(2, 2, 2))
      model = mx.gluon.rnn.LSTM(2, num_layers=6, bidirectional=True)
      model.initialize(mx.init.One())
  
      y = model(x).asnumpy()
      mx.test_utils.assert_almost_equal(
          y, EXPECTED_LSTM_OUTPUT, rtol=1e-3, atol=1e-5
      )
  
imports: import mxnet
  from mxnet import gluon, np
  import numpy
  import copy
  from functools import partial
  from numpy.testing import assert_allclose
  from mxnet.gluon.utils import split_rnn_params
  import pytest
  from mxnet.test_utils import almost_equal, assert_almost_equal, default_device
  from common import assert_raises_cudnn_not_satisfied, retry
label_desc: Use image node_id 5 for calling a global function with example usage: test_lstm_cpu_inference() without return types