code: def __init__(
      self,
      bin_centers: mx.nd.NDArray,
      label_smoothing: Optional[float] = None,
  ) -> None:
      assert label_smoothing is None or (0 <= label_smoothing < 1), (
          "Smoothing factor should be less than 1 and greater than or equal"
          " to 0."
      )
      super().__init__(self)
      self.bin_centers = bin_centers
      self.num_bins = self.bin_centers.shape[0]
      self.label_smoothing = label_smoothing
      assert len(self.bin_centers.shape) == 1
  
imports: from typing import List, Optional, Tuple
  import mxnet
  import numpy
  from mxnet import gluon
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from .distribution import MAX_SUPPORT_VAL, Distribution, _sample_multiple, getF
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 1 to create a new BinnedOutput object from inherited base classes: DistributionOutput with example: obj = BinnedOutput(bin_centers, label_smoothing)