class_docstr: A posterior based on GPyTorch's multi-variate Normal distributions.
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`.
      """
      base_shape = (
          self.distribution.batch_shape + self.distribution.event_shape
      )
      if not self._is_mt:
          base_shape += torch.Size([1])
      return sample_shape + base_shape
  
imports: from __future__ import annotations
  import warnings
  from contextlib import ExitStack
  from typing import Optional, Tuple, TYPE_CHECKING, Union
  import torch
  from botorch.exceptions.errors import BotorchTensorDimensionError
  from botorch.posteriors.base_samples import _reshape_base_samples_non_interleaved
  from botorch.posteriors.torch import TorchPosterior
  from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal
  from linear_operator import settings
  from linear_operator.operators import BlockDiagLinearOperator, DenseLinearOperator, LinearOperator, SumLinearOperator
  from torch import Tensor
  from torch.distributions import Normal
label_desc: Use image node_id 5 for calling the GPyTorchPosterior obj's underlying member method code with example usage: obj._extended_shape(sample_shape) and returns: unknown