class_docstr: A mix-in for adding sampler functionality into an acquisition function class.
  
  Attributes:
      _default_sample_shape: The `sample_shape` for the default sampler.
  
  :meta private:
docstr: Register the sampler on the acquisition function.
  
  Args:
      sampler: The sampler used to draw base samples for MC-based acquisition
          functions. If `None`, a sampler is generated on the fly within
          the `get_posterior_samples` method using `get_sampler`.
docstr_tok: ["Register","the","sampler","on","the","acquisition","function",".","Args",":","sampler",":","The","sampler","used","to","draw","base","samples","for","MC-based","acquisition","functions",".","If","`","None","`",",","a","sampler","is","generated","on","the","fly","within","the","`","get_posterior_samples","`","method","using","`","get_sampler","`","."]
code: def __init__(self, sampler: Optional[MCSampler] = None) -> None:
      r"""Register the sampler on the acquisition function.
  
      Args:
          sampler: The sampler used to draw base samples for MC-based acquisition
              functions. If `None`, a sampler is generated on the fly within
              the `get_posterior_samples` method using `get_sampler`.
      """
      self.sampler = sampler
  
imports: from __future__ import annotations
  import warnings
  from abc import ABC, abstractmethod
  from typing import Optional
  import torch
  from botorch.exceptions import BotorchWarning
  from botorch.models.model import Model, ModelDict
  from botorch.posteriors.posterior import Posterior
  from botorch.sampling.base import MCSampler
  from botorch.sampling.get_sampler import get_sampler
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new MCSamplerMixin object from inherited base classes: ABC with example: obj = MCSamplerMixin(sampler)