code: def __init__(
      self,
      gamma: torch.Tensor,
      slopes: torch.Tensor,
      knot_spacings: torch.Tensor,
      validate_args=False,
  ) -> None:
      self.gamma, self.slopes, self.knot_spacings = (
          gamma,
          slopes,
          knot_spacings,
      )
      self.b, self.knot_positions = PiecewiseLinear._to_orig_params(
          slopes, knot_spacings
      )
  
      # self.batch_shape = self.gamma.shape
      super().__init__(
          batch_shape=self.batch_shape, validate_args=validate_args
      )
  
imports: from typing import Dict, List, Optional, Tuple, cast
  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 1 to create a new PiecewiseLinear object from inherited base classes: torch.distributions with example: obj = PiecewiseLinear(gamma, slopes, knot_spacings, validate_args)