code: def __init__(
      self,
      num_layers: int,
      num_cells: int,
      cell_type: str,
      history_length: int,
      context_length: int,
      prediction_length: int,
      distr_output: DistributionOutput,
      dropout_rate: float,
      lags_seq: List[int],
      target_dim: int,
      cardinality: List[int] = [1],
      embedding_dimension: int = 1,
      scaling: bool = True,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      self.num_layers = num_layers
      self.num_cells = num_cells
      self.cell_type = cell_type
      self.history_length = history_length
      self.context_length = context_length
      self.prediction_length = prediction_length
      self.dropout_rate = dropout_rate
      self.cardinality = cardinality
      self.embedding_dimension = embedding_dimension
      self.num_cat = len(cardinality)
      self.target_dim = target_dim
      self.scaling = scaling
      self.target_dim_sample = target_dim
  
      assert len(set(lags_seq)) == len(
          lags_seq
      ), "no duplicated lags allowed!"
      lags_seq.sort()
  
      self.lags_seq = lags_seq
  
      self.distr_output = distr_output
  
      self.target_dim = target_dim
  
      with self.name_scope():
          self.proj_dist_args = distr_output.get_args_proj()
  
          residual = True
  
          self.rnn = make_rnn_cell(
              cell_type=cell_type,
              num_cells=num_cells,
              num_layers=num_layers,
              residual=residual,
              dropout_rate=dropout_rate,
          )
  
          self.embed_dim = 1
          self.embed = mx.gluon.nn.Embedding(
              input_dim=self.target_dim, output_dim=self.embed_dim
          )
  
          if scaling:
              self.scaler = MeanScaler(keepdims=True)
          else:
              self.scaler = NOPScaler(keepdims=True)
  
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 to create a new DeepVARNetwork object from inherited base classes: mx.gluon with example: obj = DeepVARNetwork(num_layers, num_cells, cell_type, history_length, context_length, prediction_length, distr_output, dropout_rate, lags_seq, target_dim, cardinality, embedding_dimension, scaling)