code: def cdf(self, z: torch.Tensor) -> torch.Tensor:
      gamma = self.gamma
      b, knot_positions = self.b, self.knot_positions
  
      knots_eval = self.quantile_internal(knot_positions, dim=-2)
      mask = torch.lt(knots_eval, z.unsqueeze(-1))
  
      sum_slopes = torch.sum(mask * b, dim=-1)
  
      zero_val = torch.zeros(
          1, dtype=gamma.dtype, device=gamma.device, layout=gamma.layout
      )
      one_val = torch.ones(
          1, dtype=gamma.dtype, device=gamma.device, layout=gamma.layout
      )
  
      sum_slopes_nz = torch.where(
          sum_slopes == zero_val, one_val, sum_slopes
      )
  
      u_tilde = torch.where(
          sum_slopes == zero_val,
          zero_val,
          (z - gamma + torch.sum(b * knot_positions * mask, dim=-1))
          / sum_slopes_nz,
      )
  
      u_tilde = torch.min(u_tilde, one_val)
  
      return u_tilde
  
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 7 for calling the PiecewiseLinear obj's underlying member method code with example usage: obj.cdf(z) and returns: u_tilde