class_docstr: Abstract base class for MC-based objectives.
  
  Args:
      _verify_output_shape: If True and `X` is given, check that the q-batch
          shape of the objectives agrees with that of X.
      _is_mo: A boolean denoting whether the objectives are multi-output.
  
  :meta private:
class_docstr_tok: ["Abstract","base","class","for","MC-based","objectives",".","Args",":","_verify_output_shape",":","If","True","and","`","X","`","is","given",",","check","that","the","q-batch","shape","of","the","objectives","agrees","with","that","of","X",".","_is_mo",":","A","boolean","denoting","whether","the","objectives","are","multi-output",".",":","meta","private",":"]
code: def __call__(
      self, samples: Tensor, X: Optional[Tensor] = None, *args, **kwargs
  ) -> Tensor:
      output = super().__call__(samples=samples, X=X, *args, **kwargs)
      # q-batch dimension is at -1 for single-output objectives and at
      # -2 for multi-output objectives.
      q_batch_idx = -2 if self._is_mo else -1
      if (
          X is not None
          and self._verify_output_shape
          and output.shape[q_batch_idx] != X.shape[-2]
      ):
          raise RuntimeError(
              "The q-batch shape of the objective values does not agree with "
              f"the q-batch shape of X. Got {output.shape[q_batch_idx]} and "
              f"{X.shape[-2]}. This may happen if you used a one-to-many input "
              "transform but forgot to use a corresponding objective."
          )
      return output
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABC, abstractmethod
  from typing import Callable, List, Optional, TYPE_CHECKING, Union
  import torch
  from botorch.exceptions.errors import BotorchTensorDimensionError, UnsupportedError
  from botorch.exceptions.warnings import InputDataWarning
  from botorch.models.model import Model
  from botorch.models.transforms.outcome import Standardize
  from botorch.posteriors.gpytorch import GPyTorchPosterior, scalarize_posterior
  from botorch.sampling import IIDNormalSampler
  from botorch.utils import apply_constraints
  from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal
  from linear_operator.operators.dense_linear_operator import to_linear_operator
  from torch import Tensor
  from torch.nn import Module
  from botorch.models.deterministic import DeterministicModel
label_desc: Use image node_id 2 for calling the MCAcquisitionObjective obj's underlying member method code with example usage: obj.__call__(samples, X) and returns: output