code: def test_solver(self):
      for trunc in self.distributions:
          # Test that solver was setup properly
          solver = trunc.solver
          self.assertIsInstance(solver, MVNXPB)
          self.assertTrue(solver.perm.equal(solver.piv_chol.perm))
          self.assertEqual(
              solver.step, trunc.covariance_matrix.shape[-1]
          )
  
          bounds = torch.gather(
              trunc.covariance_matrix.diag().rsqrt().unsqueeze(-1)
              * (trunc.bounds - trunc.loc.unsqueeze(-1)),
              dim=-2,
              index=solver.perm.unsqueeze(-1).expand(
                  *trunc.bounds.shape
              ),
          )
          self.assertTrue(solver.bounds.allclose(bounds))
  
          # Test that (permuted) covariance matrices match
          A = solver.piv_chol.diag.unsqueeze(-1) * solver.piv_chol.tril
          A = A @ A.transpose(-2, -1)
  
          n = A.shape[-1]
          B = trunc.covariance_matrix
          B = B.gather(-1, solver.perm.unsqueeze(-2).repeat(n, 1))
          B = B.gather(-2, solver.perm.unsqueeze(-1).repeat(1, n))
          self.assertTrue(A.allclose(B))
  
file_path: botorch/test/utils/probability/test_truncated_multivariate_normal.py
imports: from __future__ import annotations
  from itertools import count
  from typing import Sequence, Tuple
  import torch
  from botorch.utils.probability.mvnxpb import MVNXPB
  from botorch.utils.probability.truncated_multivariate_normal import TruncatedMultivariateNormal
  from botorch.utils.testing import BotorchTestCase
  from torch import Tensor
  from torch.distributions import MultivariateNormal
  from torch.special import ndtri
label_desc: Use image node_id 4 for calling the TestTruncatedMultivariateNormal obj's underlying member method code with example usage: obj.test_solver() without return types