code: def _quantile(
      posterior: GaussianMixturePosterior, value: Tensor
  ) -> Tensor:
      r"""Compute the posterior quantiles for the mixture of models."""
      if value.numel() > 1:
          return torch.stack(
              [_quantile(posterior=posterior, value=v) for v in value],
              dim=0,
          )
      if value <= 0 or value >= 1:
          raise ValueError(
              "value is expected to be in the range (0, 1)."
          )
      dist = torch.distributions.Normal(
          loc=posterior.mean, scale=posterior.variance.sqrt()
      )
      if posterior.mean.shape[MCMC_DIM] == 1:  # Analytical solution
          return dist.icdf(value).squeeze(MCMC_DIM)
      icdf_val = dist.icdf(value)
      low = icdf_val.min(dim=MCMC_DIM).values - TOL
      high = icdf_val.max(dim=MCMC_DIM).values + TOL
      bounds = torch.cat((low.unsqueeze(0), high.unsqueeze(0)), dim=0)
      return batched_bisect(
          f=lambda x: dist.cdf(x.unsqueeze(MCMC_DIM)).mean(
              dim=MCMC_DIM
          ),
          target=value.item(),
          bounds=bounds,
      )
  
file_path: botorch/botorch/posteriors/fully_bayesian.py
imports: from __future__ import annotations
  from typing import Callable, Optional, Tuple
  from warnings import warn
  import torch
  from botorch.posteriors.gpytorch import GPyTorchPosterior
  from gpytorch.distributions import MultivariateNormal
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: _quantile(posterior, value) and returns: batched_bisect, torch, dist