code: def __init__(
      self,
      config,
      id_list,
      quantiles,
      num_trends_modelled,
      n_forecasts,
      device,
  ):
      super().__init__(
          config=config,
          n_forecasts=n_forecasts,
          num_trends_modelled=num_trends_modelled,
          quantiles=quantiles,
          id_list=id_list,
          device=device,
      )
  
      self.segmentwise_trend = self.config_trend.trend_reg == 0
  
      # Trend_k0  parameter.
      # dimensions - [no. of quantiles,  num_trends_modelled, trend coeff shape]
      self.trend_k0 = init_parameter(
          dims=(
              [len(self.quantiles)] + [self.num_trends_modelled] + [1]
          )
      )
  
      # Configure the changepoints
      if self.config_trend.changepoints is None:
          # create equidistant changepoint times, including zero.
          linear_t = np.arange(
              self.config_trend.n_changepoints + 1
          ).astype(float)
          linear_t = linear_t / (self.config_trend.n_changepoints + 1)
          self.config_trend.changepoints = (
              self.config_trend.changepoints_range * linear_t
          )
      else:
          self.config_trend.changepoints = np.insert(
              self.config_trend.changepoints, 0, 0.0
          )
      # Register in buffer so the tensor is moved to the correct device once initialized,
      # https://pytorch-lightning.readthedocs.io/en/stable/starter/converting.html#remove-any-cuda-or-to-device-calls
      self.register_buffer(
          "trend_changepoints_t",
          torch.tensor(
              self.config_trend.changepoints,
              requires_grad=False,
              dtype=torch.float,
          ),
      )
  
      # Trend Deltas parameters
      self.trend_deltas = init_parameter(
          dims=(
              [len(self.quantiles)]
              + [self.num_trends_modelled]
              + [self.config_trend.n_changepoints + 1]
          )
      )  # including first segment
  
      # When discontinuous, the start of the segment is not defined by the previous segments.
      # This brings a new set of parameters to optimize.
      if self.config_trend.growth == "discontinuous":
          self.trend_m = init_parameter(
              dims=(
                  [len(self.quantiles)]
                  + [self.num_trends_modelled]
                  + [self.config_trend.n_changepoints + 1]
              )
          )
  
imports: import numpy
  import torch
  import torch.nn
  from neuralprophet.components.trend import Trend
  from neuralprophet.utils_torch import init_parameter
label_desc: Use image node_id 1 to create a new PiecewiseLinearTrend object from inherited base classes: Trend with example: obj = PiecewiseLinearTrend(config, id_list, quantiles, num_trends_modelled, n_forecasts, device)