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: Swap random variables at `pivot` and `step` positions.
docstr_tok: ["Swap","random","variables","at","`","pivot","`","and","`","step","`","positions","."]
code: def pivot_(self, pivot: LongTensor) -> None:
      r"""Swap random variables at `pivot` and `step` positions."""
      step = self.step
      if self.piv_chol.step == step:
          self.piv_chol.pivot_(pivot)
      elif self.step > self.piv_chol.step:
          raise ValueError
  
      for tnsr in (self.perm, self.bounds):
          swap_along_dim_(tnsr, i=self.step, j=pivot, dim=pivot.ndim)
  
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 5 for calling the MVNXPB obj's underlying member method code with example usage: obj.pivot_(pivot) without return types