code: def setUp(
      self,
      ndims: Sequence[Tuple[int, int]] = (
          (1, 1),
          (2, 3),
          (3, 2),
          (3, 3),
      ),
      lower_quantile_max: float = 0.9,  # if these get too far into the tail, naive
      upper_quantile_min: float = 0.1,  # MC methods will not produce any samples.
      num_log_probs: int = 4,
      mc_num_samples: int = 100000,
      mc_num_rsamples: int = 1000,
      mc_atol_multiplier: float = 4.0,
      seed: int = 1,
      dtype: torch.dtype = torch.float64,
      device: Optional[torch.device] = None,
  ):
      super().setUp()
      self.dtype = dtype
      self.seed_generator = count(seed)
      self.num_log_probs = num_log_probs
      self.mc_num_samples = mc_num_samples
      self.mc_num_rsamples = mc_num_rsamples
      self.mc_atol_multiplier = mc_atol_multiplier
  
      self.distributions = []
      self.sqrt_covariances = []
      with torch.random.fork_rng():
          torch.random.manual_seed(next(self.seed_generator))
          for ndim_x, ndim_y in ndims:
              ndim_xy = ndim_x + ndim_y
              sqrt_covariance = self.gen_covariances(
                  ndim_xy, as_sqrt=True
              )
              covariance = sqrt_covariance @ sqrt_covariance.transpose(
                  -1, -2
              )
  
              loc_x = torch.randn(ndim_x, **self.tkwargs)
              cov_x = covariance[:ndim_x, :ndim_x]
              std_x = cov_x.diag().sqrt()
              lb = lower_quantile_max * torch.rand(
                  ndim_x, **self.tkwargs
              )
              ub = lb.clip(min=upper_quantile_min)  # scratch variable
              ub = ub + (1 - ub) * torch.rand(ndim_x, **self.tkwargs)
              bounds_x = loc_x.unsqueeze(-1) + std_x.unsqueeze(
                  -1
              ) * ndtri(torch.stack([lb, ub], dim=-1))
  
              xcov = covariance[:ndim_x, ndim_x:]
              trunc = TruncatedMultivariateNormal(
                  loc=loc_x,
                  covariance_matrix=cov_x,
                  bounds=bounds_x,
                  validate_args=True,
              )
  
              gauss = MultivariateNormal(
                  loc=torch.randn(ndim_y, **self.tkwargs),
                  covariance_matrix=covariance[ndim_x:, ndim_x:],
              )
  
              self.sqrt_covariances.append(sqrt_covariance)
              self.distributions.append(
                  UnifiedSkewNormal(
                      trunc=trunc,
                      gauss=gauss,
                      cross_covariance_matrix=xcov,
                  )
              )
  
imports: from __future__ import annotations
  from copy import deepcopy
  from itertools import count
  from typing import Any, Dict, Optional, Sequence, Tuple
  import torch
  from botorch.utils.probability.mvnxpb import MVNXPB
  from botorch.utils.probability.truncated_multivariate_normal import TruncatedMultivariateNormal
  from botorch.utils.probability.unified_skew_normal import UnifiedSkewNormal
  from botorch.utils.testing import BotorchTestCase
  from linear_operator.operators import DenseLinearOperator
  from torch import Tensor
  from torch.distributions import MultivariateNormal
  from torch.special import ndtri
label_desc: Use image node_id 1 for calling the TestUnifiedSkewNormal obj's underlying member method code with example usage: obj.setUp(ndims, lower_quantile_max, upper_quantile_min, num_log_probs, mc_num_samples, mc_num_rsamples, mc_atol_multiplier, seed, dtype, device) without return types