code: def check_rnn_forward(layer, inputs):
      inputs.attach_grad()
      layer.initialize()
      with mx.autograd.record():
          layer.unroll(3, inputs, merge_outputs=True)[0].backward()
          mx.autograd.backward(
              layer.unroll(3, inputs, merge_outputs=False)[0]
          )
      mx.npx.waitall()
  
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 32 for calling a global function with example usage: check_rnn_forward(layer, inputs) without return types