code: def test_amp_conversion_rnn(amp_tests):
      with mx.Device(mx.gpu(0)):
          model = nn.HybridSequential()
          model.add(
              rnn.LSTM(hidden_size=10, num_layers=2, bidirectional=True)
          )
          model.add(nn.Dense(2))
          model.initialize()
          model.hybridize()
          out = model(mx.nd.ones((2, 3, 4)))
          new_model = amp.convert_hybrid_block(model)
          out2 = new_model(mx.nd.ones((2, 3, 4)))
          mx.test_utils.assert_almost_equal(
              out.asnumpy(), out2.asnumpy(), atol=1e-2, rtol=1e-2
          )
  
file_path: mxnet/tests/python/gpu/test_amp.py
imports: import sys
  from pathlib import Path
  import mxnet
  import pytest
  from mxnet import amp
  from mxnet.test_utils import set_default_device
  from mxnet.gluon import nn, rnn
  import amp.common
  from common import assert_raises_cudnn_not_satisfied
label_desc: Use image node_id 7 for calling a global function with example usage: test_amp_conversion_rnn(amp_tests) without return types