code: def make_rnn_cell(
      num_cells: int,
      num_layers: int,
      cell_type: str,
      residual: bool,
      dropout_rate: float,
  ) -> mx.gluon.HybridBlock:
      RnnCell = {
          "lstm": mx.gluon.rnn.LSTMCell,
          "gru": mx.gluon.rnn.GRUCell,
      }[cell_type]
      rnn = mx.gluon.rnn.HybridSequentialRNNCell()
      for k in range(num_layers):
          cell = RnnCell(hidden_size=num_cells)
          if residual:
              cell = mx.gluon.rnn.ResidualCell(cell) if k > 0 else cell
          cell = (
              mx.gluon.rnn.ZoneoutCell(
                  cell, zoneout_states=dropout_rate
              )
              if dropout_rate > 0.0
              else cell
          )
          rnn.add(cell)
      return rnn
  
imports: from typing import List, Optional, Tuple
  import mxnet
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.scaler import MeanScaler, NOPScaler
  from gluonts.mx.distribution import Distribution, DistributionOutput
  from gluonts.mx.util import assert_shape, weighted_average
label_desc: Use image node_id 1 for calling a global function with example usage: make_rnn_cell(num_cells, num_layers, cell_type, residual, dropout_rate) and returns: rnn