docstr: Checks that the samplers share the same sample shape.
docstr_tok: ["Checks","that","the","samplers","share","the","same","sample","shape","."]
code: def _validate_samplers(self) -> None:
      r"""Checks that the samplers share the same sample shape."""
      sample_shapes = [s.sample_shape for s in self.samplers]
      if not all(sample_shapes[0] == ss for ss in sample_shapes):
          raise UnsupportedError(
              "ListSampler requires all samplers to have the same sample shape."
          )
  
file_path: botorch/botorch/sampling/list_sampler.py
imports: from __future__ import annotations
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from botorch.posteriors.posterior_list import PosteriorList
  from botorch.sampling.base import MCSampler
  from torch import Tensor
  from torch.nn import ModuleList
label_desc: Use image node_id 2 for calling the ListSampler obj's underlying member method code with example usage: obj._validate_samplers() without return types