docstr: Computes sample paths by unrolling the RNN starting with a initial
  input and state.
  
  Parameters
  ----------
  past_target_cdf
      Past marginal CDF transformed target values (batch_size,
      history_length, target_dim)
  target_dimension_indicator
      Indices of the target dimension (batch_size, target_dim)
  time_feat
      Dynamic features of future time series (batch_size, history_length,
      num_features)
  scale
      Mean scale for each time series (batch_size, 1, target_dim)
  begin_states
      List of initial states for the RNN layers (batch_size, num_cells)
  Returns
  --------
  sample_paths : Tensor
      A tensor containing sampled paths. Shape: (1, num_sample_paths,
      prediction_length, target_dim).
docstr_tok: ["Computes","sample","paths","by","unrolling","the","RNN","starting","with","a","initial","input","and","state",".","Parameters","--","--","--","--","--","past_target_cdf","Past","marginal","CDF","transformed","target","values","(","batch_size",",","history_length",",","target_dim",")","target_dimension_indicator","Indices","of","the","target","dimension","(","batch_size",",","target_dim",")","time_feat","Dynamic","features","of","future","time","series","(","batch_size",",","history_length",",","num_features",")","scale","Mean","scale","for","each","time","series","(","batch_size",",","1",",","target_dim",")","begin_states","List","of","initial","states","for","the","RNN","layers","(","batch_size",",","num_cells",")","Returns","--","--","--","--","sample_paths",":","Tensor","A","tensor","containing","sampled","paths",".","Shape",":","(","1",",","num_sample_paths",",","prediction_length",",","target_dim",")","."]
code: def sampling_decoder(
      self,
      F,
      past_target_cdf: Tensor,
      target_dimension_indicator: Tensor,
      time_feat: Tensor,
      scale: Tensor,
      begin_states: List[Tensor],
  ) -> Tensor:
      """
      Computes sample paths by unrolling the RNN starting with a initial
      input and state.
  
      Parameters
      ----------
      past_target_cdf
          Past marginal CDF transformed target values (batch_size,
          history_length, target_dim)
      target_dimension_indicator
          Indices of the target dimension (batch_size, target_dim)
      time_feat
          Dynamic features of future time series (batch_size, history_length,
          num_features)
      scale
          Mean scale for each time series (batch_size, 1, target_dim)
      begin_states
          List of initial states for the RNN layers (batch_size, num_cells)
      Returns
      --------
      sample_paths : Tensor
          A tensor containing sampled paths. Shape: (1, num_sample_paths,
          prediction_length, target_dim).
      """
  
      def repeat(tensor):
          return tensor.repeat(
              repeats=self.num_parallel_samples, axis=0
          )
  
      # blows-up the dimension of each tensor to
      # batch_size * self.num_sample_paths for increasing parallelism
      repeated_past_target_cdf = repeat(past_target_cdf)
      repeated_time_feat = repeat(time_feat)
      repeated_scale = repeat(scale)
      repeated_target_dimension_indicator = repeat(
          target_dimension_indicator
      )
  
      # slight difference for GPVAR and DeepVAR, in GPVAR, its a list
      repeated_states = self.make_states(begin_states)
  
      future_samples = []
  
      # for each future time-units we draw new samples for this time-unit
      # and update the state
      for k in range(self.prediction_length):
          lags = self.get_lagged_subsequences(
              F=F,
              sequence=repeated_past_target_cdf,
              sequence_length=self.history_length + k,
              indices=self.shifted_lags,
              subsequences_length=1,
          )
  
          (
              rnn_outputs,
              repeated_states,
              lags_scaled,
              inputs,
          ) = self.unroll(
              F=F,
              begin_state=repeated_states,
              lags=lags,
              scale=repeated_scale,
              time_feat=repeated_time_feat.slice_axis(
                  axis=1, begin=k, end=k + 1
              ),
              target_dimension_indicator=repeated_target_dimension_indicator,
              unroll_length=1,
          )
  
          distr, distr_args = self.distr(
              time_features=inputs,
              rnn_outputs=rnn_outputs,
              scale=repeated_scale,
              target_dimension_indicator=repeated_target_dimension_indicator,
              lags_scaled=lags_scaled,
              seq_len=1,
          )
  
          # (batch_size, 1, target_dim)
          new_samples = distr.sample()
          new_samples = self.post_process_samples(new_samples)
  
          # (batch_size, seq_len, target_dim)
          future_samples.append(new_samples)
          repeated_past_target_cdf = F.concat(
              repeated_past_target_cdf, new_samples, dim=1
          )
  
      # (batch_size * num_samples, prediction_length, target_dim)
      samples = F.concat(*future_samples, dim=1)
  
      # (batch_size, num_samples, prediction_length, target_dim)
      return samples.reshape(
          shape=(
              -1,
              self.num_parallel_samples,
              self.prediction_length,
              self.target_dim,
          )
      )
  
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 8 for calling the DeepVARNetwork obj's underlying member method code with example usage: obj.sampling_decoder(F, past_target_cdf, target_dimension_indicator, time_feat, scale, begin_states) and returns: samples, tensor