code: def _pareto(x: Tensor, alpha: float, check: bool = True) -> Tensor:
      """Computes a rational polynomial that is
      1) monotonically decreasing for `x > 0`,
      2) is equal to 1 at `x = 0`,
      3) has a first and second derivative of 1 at `x = 0`, and
      4) has an asymptotic decay of `O(1 / x^alpha)`.
      These properties make it possible to use the function to define a smooth and
      fat-tailed approximation to the maximum, which enables better gradient propagation,
      see `fatmax` for details.
  
      Args:
          x: The input tensor.
          alpha: The exponent of the asymptotic decay.
          check: Whether to check if the input tensor only contains non-negative values.
  
      Returns:
          The tensor corresponding to the rational polynomial with the stated properties.
      """
      if check and (x < 0).any():
          raise ValueError("Argument `x` must be non-negative.")
      alpha = alpha / 2  # so that alpha stands for the power decay
      # choosing beta_0, beta_1 so that first and second derivatives at x = 0 are 1.
      beta_1 = 2 * alpha
      beta_0 = alpha * beta_1
      return (beta_0 / (beta_0 + beta_1 * x + x.square())).pow(alpha)
  
imports: from __future__ import annotations
  import math
  from typing import Callable, Tuple, Union
  import torch
  from botorch.exceptions import UnsupportedError
  from botorch.utils.constants import get_constants_like
  from torch import finfo, Tensor
  from torch.nn.functional import softplus
label_desc: Use image node_id 29 for calling a global function with example usage: _pareto(x, alpha, check) and returns: unknown