code: def __init__(self, num_cats: int, temperature: float = 1.0) -> None:
      super().__init__()
      assert (
          num_cats > 1
      ), "Number of categories must be larger than one."
      assert temperature > 0, "Temperature must be larger than zero."
      self.args_dim = {"num_cats": num_cats}
      self.distr_cls = Categorical
      self.num_cats = num_cats
      self.temperature = temperature
  
imports: from typing import List, Tuple
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from .distribution import Distribution, _sample_multiple, getF
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 1 to create a new CategoricalOutput object from inherited base classes: DistributionOutput with example: obj = CategoricalOutput(num_cats, temperature)