class_docstr: Generalised Pareto distribution.
  
  Parameters
  ----------
  xi
      Tensor containing the xi (heaviness) shape parameters
  beta
      Tensor containing the beta scale parameters
code: def variance(self):
      xi, beta = self.xi, self.beta
      return torch.where(
          xi < 1 / 2.0,
          torch.div(beta**2, torch.mul((1 - xi) ** 2, (1 - 2 * xi))),
          np.nan * torch.ones_like(xi),
      )
  
file_path: gluonts/src/gluonts/nursery/spliced_binned_pareto/genpareto.py
imports: from numbers import Number
  import torch
  from torch.distributions import constraints
  from torch.distributions.distribution import Distribution
  from torch.distributions.utils import broadcast_all
  import numpy
label_desc: Use image node_id 2 for calling the GenPareto obj's underlying member method code with example usage: obj.variance() and returns: torch