code: def check_rnn_unidir_layer_gradients(
      mode, input_size, hidden_size, num_layers, loss
  ):
      fused_op, stack_op, recurrent_block_prefix = create_op_by_mode(
          mode
      )
  
      fused_layer = fused_op(
          hidden_size,
          num_layers=num_layers,
          layout="NTC",
          bidirectional=False,
      )
      fused_layer.initialize()
  
      stack_layer = mx.gluon.rnn.HybridSequentialRNNCell()
      for _ in range(num_layers):
          stack_layer.add(stack_op(hidden_size))
      stack_layer.initialize()
      check_rnn_consistency(
          fused_layer,
          stack_layer,
          loss,
          mode,
          num_layers,
          input_size,
          hidden_size,
      )
  
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 25 for calling a global function with example usage: check_rnn_unidir_layer_gradients(mode, input_size, hidden_size, num_layers, loss) without return types