code: def test_update_(self):
      # Construct permuted matrices A
      n = self.matrix.shape[-1]
      A = (
          (1 / self.diag).unsqueeze(-1)
          * self.matrix
          * (1 / self.diag).unsqueeze(-2)
      )
      A = A.gather(-1, self.piv_chol.perm.unsqueeze(-2).repeat(1, n, 1))
      A = A.gather(-2, self.piv_chol.perm.unsqueeze(-1).repeat(1, 1, n))
  
      # Test upper left block
      L = torch.linalg.cholesky(A[..., :2, :2])
      self.assertTrue(L.allclose(self.piv_chol.tril[..., :2, :2]))
  
      # Test lower left block
      beta = torch.linalg.solve_triangular(
          L, A[..., :2:, 2:], upper=False
      )
      self.assertTrue(
          beta.transpose(-1, -2).allclose(
              self.piv_chol.tril[..., 2:, :2]
          )
      )
  
      # Test lower right block
      schur = A[..., 2:, 2:] - beta.transpose(-1, -2) @ beta
      self.assertTrue(
          schur.tril().allclose(self.piv_chol.tril[..., 2:, 2:])
      )
  
file_path: botorch/test/utils/probability/test_linalg.py
imports: from __future__ import annotations
  from copy import deepcopy
  import torch
  from botorch.utils.probability.linalg import augment_cholesky, PivotedCholesky
  from botorch.utils.testing import BotorchTestCase
label_desc: Use image node_id 2 for calling the TestPivotedCholesky obj's underlying member method code with example usage: obj.test_update_() without return types