class_docstr: Sampler for quasi-MC N(0,1) base samples using Sobol sequences.
  
  Example:
      >>> sampler = SobolQMCNormalSampler(torch.Size([1024]), seed=1234)
      >>> posterior = model.posterior(test_X)
      >>> samples = sampler(posterior)
class_docstr_tok: ["Sampler","for","quasi-MC","N","(","0,1",")","base","samples","using","Sobol","sequences",".","Example",":",">",">",">","sampler","=","SobolQMCNormalSampler","(","torch.Size","(","[","1024","]",")",",","seed=1234",")",">",">",">","posterior","=","model.posterior","(","test_X",")",">",">",">","samples","=","sampler","(","posterior",")"]
docstr: Generate quasi-random Normal base samples (if necessary).
  
  This function will generate a new set of base samples and set the
  `base_samples` buffer if one of the following is true:
  
  - the MCSampler has no `base_samples` attribute.
  - the output of `_get_collapsed_shape` does not agree with the shape of
      `self.base_samples`.
  
  Args:
      posterior: The Posterior for which to generate base samples.
docstr_tok: ["Generate","quasi-random","Normal","base","samples","(","if","necessary",")",".","This","function","will","generate","a","new","set","of","base","samples","and","set","the","`","base_samples","`","buffer","if","one","of","the","following","is","true",":","-","the","MCSampler","has","no","`","base_samples","`","attribute",".","-","the","output","of","`","_get_collapsed_shape","`","does","not","agree","with","the","shape","of","`","self.base_samples","`",".","Args",":","posterior",":","The","Posterior","for","which","to","generate","base","samples","."]
code: def _construct_base_samples(self, posterior: Posterior) -> None:
      r"""Generate quasi-random Normal base samples (if necessary).
  
      This function will generate a new set of base samples and set the
      `base_samples` buffer if one of the following is true:
  
      - the MCSampler has no `base_samples` attribute.
      - the output of `_get_collapsed_shape` does not agree with the shape of
          `self.base_samples`.
  
      Args:
          posterior: The Posterior for which to generate base samples.
      """
      target_shape = self._get_collapsed_shape(posterior=posterior)
      if (
          self.base_samples is None
          or self.base_samples.shape != target_shape
      ):
          base_collapsed_shape = target_shape[len(self.sample_shape) :]
          output_dim = base_collapsed_shape.numel()
          if output_dim > SobolEngine.MAXDIM:
              raise UnsupportedError(
                  "SobolQMCSampler only supports dimensions "
                  f"`q * o <= {SobolEngine.MAXDIM}`. Requested: {output_dim}"
              )
          base_samples = draw_sobol_normal_samples(
              d=output_dim,
              n=self.sample_shape.numel(),
              device=posterior.device,
              dtype=posterior.dtype,
              seed=self.seed,
          )
          base_samples = base_samples.view(target_shape)
          self.register_buffer("base_samples", base_samples)
      self.to(device=posterior.device, dtype=posterior.dtype)
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  import torch
  from botorch.exceptions import UnsupportedError
  from botorch.posteriors import Posterior
  from botorch.posteriors.higher_order import HigherOrderGPPosterior
  from botorch.posteriors.multitask import MultitaskGPPosterior
  from botorch.posteriors.transformed import TransformedPosterior
  from botorch.sampling.base import MCSampler
  from botorch.utils.sampling import draw_sobol_normal_samples, manual_seed
  from torch import Tensor
  from torch.quasirandom import SobolEngine
label_desc: Use image node_id 1 for calling the SobolQMCNormalSampler obj's underlying member method code with example usage: obj._construct_base_samples(posterior) without return types