class_docstr: Class to construct a distribution given the output of a network.
  
  Two differences compared to the base class DistributionOutput:
  1. Location param cannot be specified (all distributions must start at 0).
  2. The return type is either TPPDistribution or TPPTransformedDistribution.
class_docstr_tok: ["Class","to","construct","a","distribution","given","the","output","of","a","network",".","Two","differences","compared","to","the","base","class","DistributionOutput",":","1",".","Location","param","can","not","be","specified","(","all","distributions","must","start","at","0",")",".","2",".","The","return","type","is","either","TPPDistribution","or","TPPTransformedDistribution","."]
docstr: Construct the associated distribution, given the collection of
  constructor arguments and, optionally, a scale tensor.
  
  Parameters
  ----------
  distr_args
      Constructor arguments for the underlying TPPDistribution type.
  loc
      Location parameter, specified here for compatibility with the
      superclass. Should never be specified.
  scale
      Optional tensor, of the same shape as the
      batch_shape+event_shape of the resulting distribution.
docstr_tok: ["Construct","the","associated","distribution",",","given","the","collection","of","constructor","arguments","and",",","optionally",",","a","scale","tensor",".","Parameters","--","--","--","--","--","distr_args","Constructor","arguments","for","the","underlying","TPPDistribution","type",".","loc","Location","parameter",",","specified","here","for","compatibility","with","the","superclass",".","Should","never","be","specified",".","scale","Optional","tensor",",","of","the","same","shape","as","the","batch_shape+event_shape","of","the","resulting","distribution","."]
code: def distribution(
      self,
      distr_args,
      loc=None,
      scale: Optional[Tensor] = None,
  ) -> Union[TPPDistribution, TPPTransformedDistribution]:
      r"""
      Construct the associated distribution, given the collection of
      constructor arguments and, optionally, a scale tensor.
  
      Parameters
      ----------
      distr_args
          Constructor arguments for the underlying TPPDistribution type.
      loc
          Location parameter, specified here for compatibility with the
          superclass. Should never be specified.
      scale
          Optional tensor, of the same shape as the
          batch_shape+event_shape of the resulting distribution.
      """
      if loc is not None:
          raise ValueError(
              "loc should never be used for TPPDistributionOutput"
          )
      if scale is None:
          return self.distr_cls(*distr_args)
      else:
          distr = self.distr_cls(*distr_args)
          return TPPTransformedDistribution(
              distr, [AffineTransformation(scale=scale)]
          )
  
imports: from typing import List, Optional, Tuple, Union
  import numpy
  from mxnet import autograd
  from gluonts.mx import Tensor
  from gluonts.mx.distribution.bijection import AffineTransformation, Bijection
  from gluonts.mx.distribution.distribution import Distribution, getF
  from gluonts.mx.distribution.distribution_output import DistributionOutput
  from gluonts.mx.distribution.transformed_distribution import TransformedDistribution, sum_trailing_axes
label_desc: Use image node_id 1 for calling the TPPDistributionOutput obj's underlying member method code with example usage: obj.distribution(distr_args, loc, scale) and returns: self, TPPTransformedDistribution