code: def sigmoid(
      X: Tensor, log: bool = False, fat: bool = False
  ) -> Tensor:
      """A sigmoid function with an optional fat tail and evaluation in log space for
      better numerical behavior. Notably, the fat-tailed sigmoid can be used to remedy
      numerical underflow problems in the value and gradient of the canonical sigmoid.
  
      Args:
          X: The Tensor on which to evaluate the sigmoid.
          log: Toggles the evaluation of the log sigmoid.
          fat: Toggles the evaluation of the fat-tailed sigmoid.
  
      Returns:
          A Tensor of (log-)sigmoid values.
      """
      Y = log_fatmoid(X) if fat else logexpit(X)
      return Y if log else Y.exp()
  
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 30 for calling a global function with example usage: sigmoid(X, log, fat) and returns: unknown