class_docstr: DistributionOutput class for the Incremental (Spline) Quantile Function
  
  Parameters
  ----------
  num_pieces
      number of spline pieces for each spline
      ISQF reduces to IQF when num_pieces = 1
  alpha
      Tensor containing the x-positions of quantile knots
  tol
      tolerance for numerical safeguarding
class_docstr_tok: ["DistributionOutput","class","for","the","Incremental","(","Spline",")","Quantile","Function","Parameters","--","--","--","--","--","num_pieces","number","of","spline","pieces","for","each","spline","ISQF","reduces","to","IQF","when","num_pieces","=","1","alpha","Tensor","containing","the","x-positions","of","quantile","knots","tol","tolerance","for","numerical","safeguarding"]
docstr: auxiliary function reshaping knots and heights to (*batch_shape,
  num_qk-1, num_pieces) alpha to (*batch_shape, num_qk)
code: def reshape_spline_args(self, distr_args, qk_x):
      """
      auxiliary function reshaping knots and heights to (*batch_shape,
      num_qk-1, num_pieces) alpha to (*batch_shape, num_qk)
      """
  
      spline_knots, spline_heights = distr_args[0], distr_args[1]
      beta_l = distr_args[2]
      qk_y = distr_args[4]
      F = getF(beta_l)
  
      # FIXME number 1
      # Convert alpha from list of len=num_qk to
      # Tensor of shape (*batch_shape, num_qk)
      #
      # For example, if alpha = [0.1, 0.5, 0.9],
      # then alpha_reshape will be a Tensor of shape (*batch_shape, 3)
      # with the last dimension being [0.1, 0.5, 0.9]
      #
      # In PyTorch, it would be torch.tensor(alpha).repeat(*batch_shape,1)
      qk_x_reshape = F.concat(
          *[
              F.expand_dims(F.ones_like(beta_l), axis=-1) * qk_x[i]
              for i in range(self.num_qk)
          ],
          dim=-1,
      )
  
      # FIXME number 2
      # knots and heights have shape (*batch_shape, (num_qk-1)*num_pieces)
      # I want to convert the shape to (*batch_shape, (num_qk-1), num_pieces)
      # Here I make a shape_holder with target_shape, and use reshape_like
  
      # create a shape holder of shape (*batch_shape, num_qk-1, num_pieces)
      shape_holder = F.repeat(
          F.expand_dims(
              F.slice_axis(qk_y, axis=-1, begin=0, end=-1), axis=-1
          ),
          repeats=self.num_pieces,
          axis=-1,
      )
  
      spline_knots_reshape = F.reshape_like(spline_knots, shape_holder)
      spline_heights_reshape = F.reshape_like(
          spline_heights, shape_holder
      )
      distr_args_reshape = (
          spline_knots_reshape,
          spline_heights_reshape,
      ) + distr_args[2:]
  
      return distr_args_reshape, qk_x_reshape
  
imports: from typing import Dict, List, Optional, Tuple
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.util import cumsum
  from .bijection import AffineTransformation, Bijection
  from .distribution import Distribution, getF
  from .distribution_output import DistributionOutput
  from .transformed_distribution import TransformedDistribution
label_desc: Use image node_id 4 for calling the ISQFOutput obj's underlying member method code with example usage: obj.reshape_spline_args(distr_args, qk_x) and returns: distr_args_reshape,  qk_x_reshape