code: def log_survival_function(
      x: Tensor,
      distribution: Distribution,
  ) -> Tensor:
      """Logarithm of :math:`x` for a distribution’s survival function.
  
      Args:
          x: the input tensor.
          distribution: an object representing a continuous-valued random
              variable.
  
      Returns:
          the logarithm of :math:`x` for a distribution’s survival function.
      """
  
      if isinstance(distribution, Normal):
          standardized = torch.div(
              (x - distribution.loc), distribution.scale
          )
  
          return log_ndtr(-standardized)
  
      return torch.log1p(distribution.cdf(-x))
  
imports: import torch
  from torch import Tensor
  from torch.distributions import Distribution, Normal
  from ._log_ndtr import log_ndtr
label_desc: Use image node_id 1 for calling a global function with example usage: log_survival_function(x, distribution) and returns: torch, log_ndtr