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
  qk_x
      List 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","qk_x","List","containing","the","x-positions","of","quantile","knots","tol","tolerance","for","numerical","safeguarding"]
docstr: Domain map function The inputs of this function are specified by
  self.args_dim.
  
  spline_knots, spline_heights:
  parameterizing the x-/ y-positions of the spline knots,
  shape = (*batch_shape, (num_qk-1)*num_pieces)
  
  beta_l, beta_r:
  parameterizing the left/right tail, shape = (*batch_shape, 1)
  
  quantile_knots:
  parameterizing the y-positions of the quantile knots,
  shape = (*batch_shape, num_qk)
docstr_tok: ["Domain","map","function","The","inputs","of","this","function","are","specified","by","self.args_dim",".","spline_knots",",","spline_heights",":","parameterizing","the","x-\/","y-positions","of","the","spline","knots",",","shape","=","(","*","batch_shape",",","(","num_qk-1",")","*","num_pieces",")","beta_l",",","beta_r",":","parameterizing","the","left\/right","tail",",","shape","=","(","*","batch_shape",",","1",")","quantile_knots",":","parameterizing","the","y-positions","of","the","quantile","knots",",","shape","=","(","*","batch_shape",",","num_qk",")"]
code: def domain_map(  # type: ignore
      cls,
      spline_knots: torch.Tensor,
      spline_heights: torch.Tensor,
      beta_l: torch.Tensor,
      beta_r: torch.Tensor,
      quantile_knots: torch.Tensor,
      tol: float = 1e-4,
  ) -> Tuple[
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
  ]:
      """
      Domain map function The inputs of this function are specified by
      self.args_dim.
  
      spline_knots, spline_heights:
      parameterizing the x-/ y-positions of the spline knots,
      shape = (*batch_shape, (num_qk-1)*num_pieces)
  
      beta_l, beta_r:
      parameterizing the left/right tail, shape = (*batch_shape, 1)
  
      quantile_knots:
      parameterizing the y-positions of the quantile knots,
      shape = (*batch_shape, num_qk)
      """
  
      # Add tol to prevent the y-distance of
      # two quantile knots from being too small
      #
      # Because in this case the spline knots could be squeezed together
      # and cause overflow in spline CRPS computation
      qk_y = torch.cat(
          [
              quantile_knots[..., 0:1],
              torch.abs(quantile_knots[..., 1:]) + tol,
          ],
          dim=-1,
      )
      qk_y = torch.cumsum(qk_y, dim=-1)
  
      # Prevent overflow when we compute 1/beta
      beta_l = torch.abs(beta_l.squeeze(-1)) + tol
      beta_r = torch.abs(beta_r.squeeze(-1)) + tol
  
      return spline_knots, spline_heights, beta_l, beta_r, qk_y
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch.distributions import AffineTransform, TransformedDistribution
  from gluonts.core.component import validated
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 2 for calling the ISQFOutput obj's underlying member method code with example usage: obj.domain_map(cls, spline_knots, spline_heights, beta_l, beta_r, quantile_knots, tol) and returns: spline_knots,  spline_heights,  beta_l,  beta_r,  qk_y