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: Reshape, if needed, and concatenate (across dim=-1) a list of tensors.
docstr_tok: ["Reshape",",","if","needed",",","and","concatenate","(","across","dim=-1",")","a","list","of","tensors","."]
code: def _reshape_and_cat(self, tensors: List[Tensor]):
      r"""Reshape, if needed, and concatenate (across dim=-1) a list of tensors."""
      if self._is_gaussian_mixture:
          mcmc_samples = self._get_mcmc_batch_dimension()
          return torch.cat(
              [
                  x
                  if isinstance(p, GaussianMixturePosterior)
                  else self._reshape_tensor(
                      x, mcmc_samples=mcmc_samples
                  )
                  for x, p in zip(tensors, self.posteriors)
              ],
              dim=-1,
          )
      else:
          return torch.cat(tensors, dim=-1)
  
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 5 for calling the PosteriorList obj's underlying member method code with example usage: obj._reshape_and_cat(tensors) and returns: torch, torch