class_docstr: A sampler that simply calls `posterior.rsample` to generate the
  samples. This should only be used for stochastic optimization of the
  acquisition functions, e.g., via `gen_candidates_torch`. This should
  not be used with `optimize_acqf`, which uses deterministic optimizers
  under the hood.
  
  NOTE: This ignores the `seed` option.
docstr: Draws MC samples from the posterior.
  
  Args:
      posterior: The posterior to sample from.
  
  Returns:
      The samples drawn from the posterior.
docstr_tok: ["Draws","MC","samples","from","the","posterior",".","Args",":","posterior",":","The","posterior","to","sample","from",".","Returns",":","The","samples","drawn","from","the","posterior","."]
code: def forward(self, posterior: Posterior) -> Tensor:
      r"""Draws MC samples from the posterior.
  
      Args:
          posterior: The posterior to sample from.
  
      Returns:
          The samples drawn from the posterior.
      """
      return posterior.rsample(sample_shape=self.sample_shape)
  
file_path: botorch/botorch/sampling/stochastic_samplers.py
imports: from __future__ import annotations
  import torch
  from botorch.posteriors import Posterior
  from botorch.sampling.base import MCSampler
  from torch import Tensor
label_desc: Use image node_id 1 for calling the StochasticSampler obj's underlying member method code with example usage: obj.forward(posterior) and returns: posterior