code: def __init__(
      self,
      num_series: int,
      channels: int,
      kernel_size: int,
      rnn_cell_type: str,
      rnn_num_layers: int,
      rnn_num_cells: int,
      skip_rnn_cell_type: str,
      skip_rnn_num_layers: int,
      skip_rnn_num_cells: int,
      skip_size: int,
      ar_window: int,
      context_length: int,
      lead_time: int,
      prediction_length: int,
      dropout_rate: float,
      output_activation: Optional[str],
      scaling: bool,
      dtype: Type,
      *args,
      **kwargs,
  ) -> None:
      super().__init__(*args, **kwargs)
      self.num_series = num_series
      self.channels = channels
      assert (
          channels % skip_size == 0
      ), "number of conv2d `channels` must be divisible by the `skip_size`"
      self.skip_size = skip_size
      assert (
          ar_window > 0
      ), "auto-regressive window must be a positive integer"
      self.ar_window = ar_window
      assert lead_time >= 0, "`lead_time` must be greater than zero"
      assert (
          prediction_length > 0
      ), "`prediction_length` must be greater than zero"
      self.prediction_length = prediction_length
      self.horizon = lead_time
      assert (
          context_length > 0
      ), "`context_length` must be greater than zero"
      self.context_length = context_length
      if output_activation is not None:
          assert output_activation in [
              "sigmoid",
              "tanh",
          ], "`output_activation` must be either 'sigmiod' or 'tanh' "
      self.output_activation = output_activation
      assert rnn_cell_type in [
          "gru",
          "lstm",
      ], "`rnn_cell_type` must be either 'gru' or 'lstm' "
      assert skip_rnn_cell_type in [
          "gru",
          "lstm",
      ], "`skip_rnn_cell_type` must be either 'gru' or 'lstm' "
      self.conv_out = context_length - kernel_size + 1
      self.conv_skip = self.conv_out // skip_size
      assert self.conv_skip > 0, (
          "conv2d output size must be greater than or equal to `skip_size`\n"
          "Choose a smaller `kernel_size` or bigger `context_length`"
      )
      self.channel_skip_count = self.conv_skip * skip_size
      self.dtype = dtype
      with self.name_scope():
          self.cnn = nn.Conv2D(
              channels,
              (num_series, kernel_size),
              activation="relu",
              layout="NCHW",
              in_channels=2,
          )  # NC1T
          self.cnn.cast(dtype)
          self.dropout = nn.Dropout(dropout_rate)
          self.rnn = self._create_rnn_layer(
              rnn_num_cells, rnn_num_layers, rnn_cell_type, dropout_rate
          )  # NTC
          self.rnn.cast(dtype)
          self.skip_rnn_num_cells = skip_rnn_num_cells
          self.skip_rnn = self._create_rnn_layer(
              skip_rnn_num_cells,
              skip_rnn_num_layers,
              skip_rnn_cell_type,
              dropout_rate,
          )  # NTC
          self.skip_rnn.cast(dtype)
          # TODO: add temporal attention option
          self.fc = nn.Dense(num_series, dtype=dtype)
          self.ar_fc = nn.Dense(
              prediction_length, dtype=dtype, flatten=False
          )
          if scaling:
              self.scaler = MeanScaler(axis=2, keepdims=True)
          else:
              self.scaler = NOPScaler(axis=2, keepdims=True)
  
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 1 to create a new LSTNetBase object from inherited base classes: nn with example: obj = LSTNetBase(num_series, channels, kernel_size, rnn_cell_type, rnn_num_layers, rnn_num_cells, skip_rnn_cell_type, skip_rnn_num_layers, skip_rnn_num_cells, skip_size, ar_window, context_length, lead_time, prediction_length, dropout_rate, output_activation, scaling, dtype)