code: def test_residual():
      cell = gluon.rnn.ResidualCell(gluon.rnn.GRUCell(50))
      inputs = [mx.np.ones((10, 50)) for i in range(2)]
      cell.infer_shape(0, inputs[0], False)
      cell.initialize()
      outputs, _ = cell.unroll(2, inputs)
      params = cell.collect_params()
      assert sorted(params.keys()) == [
          "base_cell.h2h_bias",
          "base_cell.h2h_weight",
          "base_cell.i2h_bias",
          "base_cell.i2h_weight",
      ]
  
      outs = [o.shape for o in outputs]
      assert outs == [(10, 50), (10, 50)]
  
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 7 for calling a global function with example usage: test_residual() without return types