code: def _create_rnn_layer(
      num_cells: int,
      num_layers: int,
      cell_type: str,
      dropout_rate: float,
  ) -> nn.HybridBlock:
      # TODO: GRUCell activation is fixed to tanh
      RnnCell = {
          "lstm": mx.gluon.rnn.LSTMCell,
          "gru": mx.gluon.rnn.GRUCell,
      }[cell_type]
      rnn = mx.gluon.rnn.HybridSequentialRNNCell()
      for _ in range(num_layers):
          cell = RnnCell(hidden_size=num_cells)
          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 Optional, Type
  import mxnet
  from mxnet.gluon import loss, nn
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.block.scaler import MeanScaler, NOPScaler
label_desc: Use image node_id 2 for calling the LSTNetBase obj's underlying member method code with example usage: obj._create_rnn_layer(num_cells, num_layers, cell_type, dropout_rate) and returns: rnn