class_docstr: Multi-fidelity max-value entropy.
  
  The acquisition function for multi-fidelity max-value entropy search
  with support for trace observations. See [Takeno2020mfmves]_
  for a detailed discussion of the basic ideas on multi-fidelity MES
  (note that this implementation is somewhat different).
  
  The model must be single-outcome, unless using a PosteriorTransform.
  The batch case `q > 1` is supported through cyclic optimization and fantasies.
  
  Example:
      >>> model = SingleTaskGP(train_X, train_Y)
      >>> candidate_set = torch.rand(1000, bounds.size(1))
      >>> candidate_set = bounds[0] + (bounds[1] - bounds[0]) * candidate_set
      >>> MF_MES = qMultiFidelityMaxValueEntropy(model, candidate_set)
      >>> mf_mes = MF_MES(test_X)
code: def cost_sampler(self):
      if self._cost_sampler is None:
          # Note: Using the deepcopy here is essential. Removing this poses a
          # problem if the base model and the cost model have a different number
          # of outputs or test points (this would be caused by expand), as this
          # would trigger re-sampling the base samples in the fantasy sampler.
          # By cloning the sampler here, the right thing will happen if the
          # the sizes are compatible, if they are not this will result in
          # samples being drawn using different base samples, but it will at
          # least avoid changing state of the fantasy sampler.
          self._cost_sampler = deepcopy(self.fantasies_sampler)
      return self._cost_sampler
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from math import log
  from typing import Any, Callable, Optional
  import numpy
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction, MCSamplerMixin
  from botorch.acquisition.cost_aware import CostAwareUtility, InverseCostWeightedUtility
  from botorch.acquisition.objective import PosteriorTransform
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.cost import AffineFidelityCostModel
  from botorch.models.model import Model
  from botorch.models.utils import check_no_nans
  from botorch.sampling.normal import SobolQMCNormalSampler
  from botorch.utils.transforms import match_batch_shape, t_batch_mode_transform
  from linear_operator.functions import inv_quad
  from linear_operator.utils.cholesky import psd_safe_cholesky
  from scipy.optimize import brentq
  from scipy.stats import norm
  from torch import Tensor
label_desc: Use image node_id 2 for calling the qMultiFidelityMaxValueEntropy obj's underlying member method code with example usage: obj.cost_sampler() and returns: self