code: def __init__(
      self,
      M,
      S,
      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,
      seq_axis: Optional[List[int]] = None,
      **kwargs,
  ) -> None:
      super().__init__(
          num_layers=num_layers,
          num_cells=num_cells,
          cell_type=cell_type,
          history_length=history_length,
          context_length=context_length,
          prediction_length=prediction_length,
          distr_output=distr_output,
          dropout_rate=dropout_rate,
          lags_seq=lags_seq,
          target_dim=target_dim,
          cardinality=cardinality,
          embedding_dimension=embedding_dimension,
          scaling=scaling,
          **kwargs,
      )
  
      self.M = M
      self.S = S
      self.seq_axis = seq_axis
  
imports: import logging
  from typing import List, Optional
  from itertools import product
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.distribution import Distribution, DistributionOutput
  from gluonts.mx.distribution import EmpiricalDistribution
  from gluonts.mx.util import assert_shape
  from gluonts.mx.distribution import LowrankMultivariateGaussian
  from gluonts.mx.model.deepvar._network import DeepVARNetwork, DeepVARTrainingNetwork, DeepVARPredictionNetwork
label_desc: Use image node_id 1 to create a new DeepVARHierarchicalNetwork object from inherited base classes: DeepVARNetwork with example: obj = DeepVARHierarchicalNetwork(M, S, num_layers, num_cells, cell_type, history_length, context_length, prediction_length, distr_output, dropout_rate, lags_seq, target_dim, cardinality, embedding_dimension, scaling, seq_axis)