code: def test_MaxValueEntropySearch_MultiFidelity(self) -> None:
      search_space_digest = dataclasses.replace(
          self.search_space_digest,
          fidelity_features=[-1],
      )
      model = MaxValueEntropySearch()
      model.fit(
          datasets=self.training_data,
          metric_names=self.metric_names,
          search_space_digest=search_space_digest,
      )
  
      # Check best point selection within bounds (some numerical tolerance)
      torch_opt_config = TorchOptConfig(
          objective_weights=self.objective_weights,
      )
      xbest = model.best_point(
          search_space_digest=dataclasses.replace(
              search_space_digest,
              fidelity_features=[2],
              target_values={2: 5.0},
          ),
          torch_opt_config=torch_opt_config,
      )
      lb = torch.tensor([b[0] for b in self.bounds]) - 1e-5
      ub = torch.tensor([b[1] for b in self.bounds]) + 1e-5
      self.assertTrue(torch.all(xbest <= ub))
      self.assertTrue(torch.all(xbest >= lb))
  
      # check error when no target fidelities are specified
      with self.assertRaises(RuntimeError):
          model.best_point(
              search_space_digest=search_space_digest,
              torch_opt_config=torch_opt_config,
          )
  
      # check error when target fidelity and fixed features have the same key
      with self.assertRaises(RuntimeError):
          model.best_point(
              search_space_digest=dataclasses.replace(
                  search_space_digest,
                  target_values={2: 1.0},
              ),
              torch_opt_config=dataclasses.replace(
                  torch_opt_config,
                  fixed_features={2: 1.0},
              ),
          )
  
      # check generation
      n = 1
      gen_results = model.gen(
          n=n,
          search_space_digest=dataclasses.replace(
              search_space_digest,
              target_values={2: 1.0},
          ),
          torch_opt_config=dataclasses.replace(
              torch_opt_config,
              model_gen_options={
                  "acquisition_function_kwargs": self.acq_options,
              },
          ),
      )
      self.assertEqual(gen_results.points.shape, torch.Size([n, 3]))
      self.assertTrue(
          torch.equal(
              gen_results.weights,
              torch.ones(n, dtype=self.tkwargs["dtype"]),
          )
      )
  
      # test input warping
      self.assertFalse(model.use_input_warping)
      model = MaxValueEntropySearch(use_input_warping=True)
      model.fit(
          datasets=self.training_data,
          metric_names=self.metric_names,
          search_space_digest=SearchSpaceDigest(
              feature_names=self.feature_names,
              bounds=self.bounds,
              fidelity_features=[-1],
          ),
      )
      self.assertTrue(model.use_input_warping)
      self.assertTrue(hasattr(model.model, "input_transform"))
      self.assertIsInstance(model.model.input_transform, Warp)
  
      # test loocv pseudo likelihood
      self.assertFalse(model.use_loocv_pseudo_likelihood)
      model = MaxValueEntropySearch(use_loocv_pseudo_likelihood=True)
      model.fit(
          datasets=self.training_data,
          metric_names=self.metric_names,
          search_space_digest=search_space_digest,
      )
      self.assertTrue(model.use_loocv_pseudo_likelihood)
  
file_path: Ax/ax/models/tests/test_botorch_mes.py
imports: import dataclasses
  from typing import Any, Dict
  from unittest import mock
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.models.torch.botorch_mes import _instantiate_MES, MaxValueEntropySearch
  from ax.models.torch_base import TorchOptConfig
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.mock import fast_botorch_optimize
  from botorch.acquisition.max_value_entropy_search import qMaxValueEntropy, qMultiFidelityMaxValueEntropy
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.transforms.input import Warp
  from botorch.sampling.normal import SobolQMCNormalSampler
  from botorch.utils.datasets import SupervisedDataset
label_desc: Use image node_id 3 for calling the MaxValueEntropySearchTest obj's underlying member method code with example usage: obj.test_MaxValueEntropySearch_MultiFidelity() without return types