class_docstr: A sampler that calls `posterior.rsample_from_base_samples` to
  generate the samples via index base samples.
docstr: Draws MC samples from the posterior.
  
  Args:
      posterior: The ensemble posterior to sample from.
  
  Returns:
      The samples drawn from the posterior.
code: def forward(self, posterior: EnsemblePosterior) -> Tensor:
      r"""Draws MC samples from the posterior.
  
      Args:
          posterior: The ensemble posterior to sample from.
  
      Returns:
          The samples drawn from the posterior.
      """
      self._construct_base_samples(posterior=posterior)
      samples = posterior.rsample_from_base_samples(
          sample_shape=self.sample_shape, base_samples=self.base_samples
      )
      return samples
  
file_path: botorch/botorch/sampling/index_sampler.py
imports: from __future__ import annotations
  import torch
  from botorch.posteriors.ensemble import EnsemblePosterior
  from botorch.sampling.base import MCSampler
  from torch import Tensor
label_desc: Use image node_id 1 for calling the IndexSampler obj's underlying member method code with example usage: obj.forward(posterior) and returns: samples