code: def rsample(
      self, sample_shape: torch.Size = torch.Size()
  ) -> torch.Tensor:
      target_shape = (
          self.gamma.shape
          if sample_shape == torch.Size()
          else torch.Size(sample_shape) + self.gamma.shape
      )
  
      u = torch.rand(
          target_shape,
          dtype=self.gamma.dtype,
          device=self.gamma.device,
          layout=self.gamma.layout,
      )
  
      sample = self.quantile(u)
  
      if sample_shape == torch.Size():
          sample = sample.squeeze(dim=0)
  
      return sample
  
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 10 for calling the PiecewiseLinear obj's underlying member method code with example usage: obj.rsample(sample_shape) and returns: sample