class_docstr: A Posterior represented by a list of independent Posteriors.
  
  When at least one of the posteriors is a `GaussianMixturePosterior`, the other
  posteriors are expanded to match the size of the `GaussianMixturePosterior`.
class_docstr_tok: ["A","Posterior","represented","by","a","list","of","independent","Posteriors",".","When","at","least","one","of","the","posteriors","is","a","`","GaussianMixturePosterior","`",",","the","other","posteriors","are","expanded","to","match","the","size","of","the","`","GaussianMixturePosterior","`","."]
docstr: Return the number of MCMC samples in the corresponding batch dimension.
docstr_tok: ["Return","the","number","of","MCMC","samples","in","the","corresponding","batch","dimension","."]
code: def _get_mcmc_batch_dimension(self) -> int:
      """Return the number of MCMC samples in the corresponding batch dimension."""
      mcmc_samples = [
          p.mean.shape[MCMC_DIM]
          for p in self.posteriors
          if isinstance(p, GaussianMixturePosterior)
      ]
      if len(set(mcmc_samples)) > 1:
          raise NotImplementedError(
              "All MCMC batch dimensions must have the same size, got shapes: "
              f"{mcmc_samples}."
          )
      return mcmc_samples[0]
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import Any, List, Optional
  import torch
  from botorch.posteriors.fully_bayesian import GaussianMixturePosterior, MCMC_DIM
  from botorch.posteriors.posterior import Posterior
  from torch import Tensor
label_desc: Use image node_id 3 for calling the PosteriorList obj's underlying member method code with example usage: obj._get_mcmc_batch_dimension() and returns: mcmc_samples