class_docstr: An algorithm for approximating Gaussian probabilities `P(X \in bounds)`, where
  `X ~ N(0, covariance_matrix)`.
class_docstr_tok: ["An","algorithm","for","approximating","Gaussian","probabilities","`","P","(","X","\\in","bounds",")","`",",","where","`","X","~","N","(","0",",","covariance_matrix",")","`","."]
docstr: Creates an MVNXPB instance from raw arguments. Unlike MVNXPB.__init__,
  this methods does not preprocess or copy terms.
  
  Args:
      step: Integer used to track the solver's progress.
      bounds: Tensor of lower and upper bounds, `batch_shape x [n, 2]`.
      piv_chol: A PivotedCholesky instance for the system.
      plug_ins: Tensor of plug-in estimators used to update lower and upper bounds
          on random variables that have yet to be integrated out.
      log_prob: Tensor of log probabilities.
      log_prob_extra: Tensor of conditional log probabilities for the next random
          variable. Used when integrating over an odd number of random variables.
docstr_tok: ["Creates","an","MVNXPB","instance","from","raw","arguments",".","Unlike","MVNXPB.__init__",",","this","methods","does","not","preprocess","or","copy","terms",".","Args",":","step",":","Integer","used","to","track","the","solver","'s","progress",".","bounds",":","Tensor","of","lower","and","upper","bounds",",","`","batch_shape","x","[","n",",","2","]","`",".","piv_chol",":","A","PivotedCholesky","instance","for","the","system",".","plug_ins",":","Tensor","of","plug-in","estimators","used","to","update","lower","and","upper","bounds","on","random","variables","that","have","yet","to","be","integrated","out",".","log_prob",":","Tensor","of","log","probabilities",".","log_prob_extra",":","Tensor","of","conditional","log","probabilities","for","the","next","random","variable",".","Used","when","integrating","over","an","odd","number","of","random","variables","."]
code: def build(
      cls,
      step: int,
      perm: Tensor,
      bounds: Tensor,
      piv_chol: PivotedCholesky,
      plug_ins: Tensor,
      log_prob: Tensor,
      log_prob_extra: Optional[Tensor] = None,
  ) -> MVNXPB:
      r"""Creates an MVNXPB instance from raw arguments. Unlike MVNXPB.__init__,
      this methods does not preprocess or copy terms.
  
      Args:
          step: Integer used to track the solver's progress.
          bounds: Tensor of lower and upper bounds, `batch_shape x [n, 2]`.
          piv_chol: A PivotedCholesky instance for the system.
          plug_ins: Tensor of plug-in estimators used to update lower and upper bounds
              on random variables that have yet to be integrated out.
          log_prob: Tensor of log probabilities.
          log_prob_extra: Tensor of conditional log probabilities for the next random
              variable. Used when integrating over an odd number of random variables.
      """
      new = cls.__new__(cls)
      new.step = step
      new.perm = perm
      new.bounds = bounds
      new.piv_chol = piv_chol
      new.plug_ins = plug_ins
      new.log_prob = log_prob
      new.log_prob_extra = log_prob_extra
      return new
  
imports: from __future__ import annotations
  from typing import Any, Optional, TypedDict
  from warnings import warn
  import torch
  from botorch.utils.probability.bvn import bvn, bvnmom
  from botorch.utils.probability.linalg import augment_cholesky, block_matrix_concat, PivotedCholesky
  from botorch.utils.probability.utils import case_dispatcher, get_constants_like, ndtr, phi, STANDARDIZED_RANGE, swap_along_dim_
  from botorch.utils.safe_math import log, mul
  from linear_operator.utils.cholesky import psd_safe_cholesky
  from linear_operator.utils.errors import NotPSDError
  from torch import LongTensor, Tensor
  from torch.nn.functional import pad
label_desc: Use image node_id 2 for calling the MVNXPB obj's underlying member method code with example usage: obj.build(cls, step, perm, bounds, piv_chol, plug_ins, log_prob, log_prob_extra) and returns: new