class_docstr: Distribution class for the model MQF2 proposed in the paper
  ``Multivariate Quantile Function Forecaster``
  by Kan, Aubet, Januschowski, Park, Benidis, Ruthotto, Gasthaus
  Parameters
  ----------
  picnn
      A SequentialNet instance of a
      partially input convex neural network (picnn)
  hidden_state
      hidden_state obtained by unrolling the RNN encoder
      shape = (batch_size, context_length, hidden_size) in training
      shape = (batch_size, hidden_size) in inference
  prediction_length
      Length of the prediction horizon
  is_energy_score
      If True, use energy score as objective function
      otherwise use maximum likelihood as
      objective function (normalizing flows)
  es_num_samples
      Number of samples drawn to approximate the energy score
  beta
      Hyperparameter of the energy score (power of the two terms)
  threshold_input
      Clamping threshold of the (scaled) input when maximum
      likelihood is used as objective function
      this is used to make the forecaster more robust
      to outliers in training samples
  validate_args
      Sets whether validation is enabled or disabled
      For more details, refer to the descriptions in
      torch.distributions.distribution.Distribution
docstr: Generates the predicted paths associated with the quantile levels alpha
  Parameters
  ----------
  alpha
      quantile levels,
      shape = (batch_shape, prediction_length)
  hidden_state
      hidden_state, shape = (batch_shape, hidden_size)
  Returns
  -------
  results
      predicted paths of shape = (batch_shape, prediction_length)
docstr_tok: ["Generates","the","predicted","paths","associated","with","the","quantile","levels","alpha","Parameters","--","--","--","--","--","alpha","quantile","levels",",","shape","=","(","batch_shape",",","prediction_length",")","hidden_state","hidden_state",",","shape","=","(","batch_shape",",","hidden_size",")","Returns","--","--","--","-","results","predicted","paths","of","shape","=","(","batch_shape",",","prediction_length",")"]
code: def quantile(
      self,
      alpha: torch.Tensor,
      hidden_state: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      """
      Generates the predicted paths associated with the quantile levels alpha
      Parameters
      ----------
      alpha
          quantile levels,
          shape = (batch_shape, prediction_length)
      hidden_state
          hidden_state, shape = (batch_shape, hidden_size)
      Returns
      -------
      results
          predicted paths of shape = (batch_shape, prediction_length)
      """
  
      if hidden_state is None:
          hidden_state = self.hidden_state
  
      normal_quantile = self.standard_normal.icdf(alpha)
  
      # In the energy score approach, we directly draw samples from picnn
      # In the MLE (Normalizing flows) approach, we need to invert the picnn
      # (go backward through the flow) to draw samples
      if self.is_energy_score:
          result = self.picnn(normal_quantile, context=hidden_state)
      else:
          result = self.picnn.reverse(
              normal_quantile, context=hidden_state
          )
  
      return result
  
imports: from typing import List, Optional, Tuple
  from cpflows.flows import DeepConvexFlow, SequentialFlow
  import torch
  from torch.distributions import AffineTransform, Distribution, Normal, TransformedDistribution
  import torch.nn.functional
label_desc: Use image node_id 7 for calling the MQF2Distribution obj's underlying member method code with example usage: obj.quantile(alpha, hidden_state) and returns: result