docstr: Computes the log probability `ln p(Y = value | a < X < b)`.
docstr_tok: ["Computes","the","log","probability","`","ln","p","(","Y","=","value","|","a","<","X","<","b",")","`","."]
code: def log_prob(self, value: Tensor) -> Tensor:
      r"""Computes the log probability `ln p(Y = value | a < X < b)`."""
      event_ndim = len(self.event_shape)
      if (
          value.ndim < event_ndim
          or value.shape[-event_ndim:] != self.event_shape
      ):
          raise ValueError(
              f"`value` with shape {value.shape} does not comply with the instance's"
              f"`event_shape` of {self.event_shape}."
          )
  
      # Iterate with a fixed batch size to keep memory overhead in check
      i = 0
      pre_shape = value.shape[
          : -len(self.event_shape) - len(self.batch_shape)
      ]
      batch_size = self.batch_shape.numel()
      log_probs = torch.empty(
          pre_shape.numel() * batch_size,
          device=value.device,
          dtype=value.dtype,
      )
      for batch in value.view(-1, *value.shape[len(pre_shape) :]):
          log_probs[i : i + batch_size] = self._log_prob(batch).view(-1)
          i += batch_size
  
      return log_probs.view(pre_shape + self.batch_shape)
  
imports: from __future__ import annotations
  from inspect import getmembers
  from typing import Optional, Sequence, Union
  import torch
  from botorch.utils.probability.linalg import augment_cholesky, block_matrix_concat
  from botorch.utils.probability.mvnxpb import MVNXPB
  from botorch.utils.probability.truncated_multivariate_normal import TruncatedMultivariateNormal
  from linear_operator.operators import LinearOperator
  from linear_operator.utils.errors import NotPSDError
  from torch import Tensor
  from torch.distributions.multivariate_normal import Distribution, MultivariateNormal
  from torch.distributions.utils import lazy_property
  from torch.nn.functional import pad
label_desc: Use image node_id 2 for calling the UnifiedSkewNormal obj's underlying member method code with example usage: obj.log_prob(value) and returns: log_probs