class_docstr: Ensemble posterior, that should be used for ensemble models that compute
  eagerly a finite number of samples per X value as for example a deep ensemble
  or a random forest.
class_docstr_tok: ["Ensemble","posterior",",","that","should","be","used","for","ensemble","models","that","compute","eagerly","a","finite","number","of","samples","per","X","value","as","for","example","a","deep","ensemble","or","a","random","forest","."]
docstr: Returns the shape of the samples produced by the posterior with
  the given `sample_shape`.
docstr_tok: ["Returns","the","shape","of","the","samples","produced","by","the","posterior","with","the","given","`","sample_shape","`","."]
code: def _extended_shape(
      self, sample_shape: torch.Size = torch.Size()  # noqa: B008
  ) -> torch.Size:
      r"""Returns the shape of the samples produced by the posterior with
      the given `sample_shape`.
      """
      return (
          sample_shape + self.values.shape[:-3] + self.values.shape[-2:]
      )
  
file_path: botorch/botorch/posteriors/ensemble.py
imports: from __future__ import annotations
  from typing import Optional
  import torch
  from botorch.posteriors.posterior import Posterior
  from torch import Tensor
label_desc: Use image node_id 8 for calling the EnsemblePosterior obj's underlying member method code with example usage: obj._extended_shape(sample_shape) and returns: unknown