docstr: The shape of a base sample used for constructing posterior samples.
  
  Overwrites the standard `base_sample_shape` call to inform samplers that
  `n + 2 n_train` samples need to be drawn rather than n samples.
docstr_tok: ["The","shape","of","a","base","sample","used","for","constructing","posterior","samples",".","Overwrites","the","standard","`","base_sample_shape","`","call","to","inform","samplers","that","`","n","+","2","n_train","`","samples","need","to","be","drawn","rather","than","n","samples","."]
code: def base_sample_shape(self) -> torch.Size:
      r"""The shape of a base sample used for constructing posterior samples.
  
      Overwrites the standard `base_sample_shape` call to inform samplers that
      `n + 2 n_train` samples need to be drawn rather than n samples.
      """
      batch_shape = self.joint_covariance_matrix.shape[:-2]
      sampling_shape = (
          self.joint_covariance_matrix.shape[-2]
          + self.train_noise.shape[-2]
      )
      if self.observation_noise:
          sampling_shape = sampling_shape + self.test_noise.shape[-2]
      return batch_shape + torch.Size((sampling_shape,))
  
file_path: botorch/botorch/posteriors/multitask.py
imports: from typing import Optional, Tuple, Union
  import torch
  from botorch.exceptions.errors import BotorchTensorDimensionError
  from botorch.posteriors.gpytorch import GPyTorchPosterior
  from gpytorch.distributions import MultivariateNormal
  from linear_operator.operators import LinearOperator, to_linear_operator
  from torch import Tensor
label_desc: Use image node_id 2 for calling the MultitaskGPPosterior obj's underlying member method code with example usage: obj.base_sample_shape() and returns: unknown