code: def _get_sampler_mvn(
      posterior: GPyTorchPosterior,
      sample_shape: torch.Size,
      **kwargs: Any,
  ) -> NormalMCSampler:
      r"""The Sobol normal sampler for the `MultivariateNormal` posterior.
  
      If the output dim is too large, falls back to `IIDNormalSampler`.
      """
      sampler = SobolQMCNormalSampler(
          sample_shape=sample_shape, **kwargs
      )
      collapsed_shape = sampler._get_collapsed_shape(
          posterior=posterior
      )
      base_collapsed_shape = collapsed_shape[len(sample_shape) :]
      if base_collapsed_shape.numel() > SobolEngine.MAXDIM:
          logger.warning(
              f"Output dim {base_collapsed_shape.numel()} is too large for the "
              "Sobol engine. Using IIDNormalSampler instead."
          )
          sampler = IIDNormalSampler(
              sample_shape=sample_shape, **kwargs
          )
      return sampler
  
imports: from typing import Any, Type, Union
  import torch
  from botorch.logging import logger
  from botorch.posteriors.deterministic import DeterministicPosterior
  from botorch.posteriors.ensemble import EnsemblePosterior
  from botorch.posteriors.gpytorch import GPyTorchPosterior
  from botorch.posteriors.posterior import Posterior
  from botorch.posteriors.posterior_list import PosteriorList
  from botorch.posteriors.torch import TorchPosterior
  from botorch.posteriors.transformed import TransformedPosterior
  from botorch.sampling.base import MCSampler
  from botorch.sampling.deterministic import DeterministicSampler
  from botorch.sampling.index_sampler import IndexSampler
  from botorch.sampling.list_sampler import ListSampler
  from botorch.sampling.normal import IIDNormalSampler, NormalMCSampler, SobolQMCNormalSampler
  from botorch.utils.dispatcher import Dispatcher
  from gpytorch.distributions import MultivariateNormal
  from torch.distributions import Distribution
  from torch.quasirandom import SobolEngine
label_desc: Use image node_id 3 for calling a global function with example usage: _get_sampler_mvn(posterior, sample_shape) and returns: sampler