code: def test_q_lower_bound_max_value_entropy(self):
      for dtype in (torch.float, torch.double):
          torch.manual_seed(7)
          mm = MESMockModel()
          with self.assertRaises(TypeError):
              qLowerBoundMaxValueEntropy(mm)
  
          candidate_set = torch.rand(
              1000, 2, device=self.device, dtype=dtype
          )
  
          # test error in case of batch GP model
          # train_inputs = torch.rand(5, 10, 2, device=self.device, dtype=dtype)
          # mm.train_inputs = (train_inputs,)
          mm = MESMockModel(batch_shape=torch.Size([2]))
          with self.assertRaises(NotImplementedError):
              qLowerBoundMaxValueEntropy(
                  mm, candidate_set, num_mv_samples=10
              )
  
          # test error when number of outputs > 1 and no transform
          mm = MESMockModel()
          mm._num_outputs = 2
          with self.assertRaises(UnsupportedError):
              qLowerBoundMaxValueEntropy(
                  mm, candidate_set, num_mv_samples=10
              )
          mm._num_outputs = 1
  
          # test with X_pending is None
          mm = MESMockModel()
          train_inputs = torch.rand(
              10, 2, device=self.device, dtype=dtype
          )
          mm.train_inputs = (train_inputs,)
          qGIBBON = qLowerBoundMaxValueEntropy(
              mm, candidate_set, num_mv_samples=10
          )
  
          # test initialization
          self.assertEqual(qGIBBON.num_mv_samples, 10)
          self.assertEqual(qGIBBON.use_gumbel, True)
          self.assertEqual(
              qGIBBON.posterior_max_values.shape, torch.Size([10, 1])
          )
  
          # test evaluation
          X = torch.rand(1, 2, device=self.device, dtype=dtype)
          self.assertEqual(qGIBBON(X).shape, torch.Size([1]))
  
          # test with use_gumbel = False
          qGIBBON = qLowerBoundMaxValueEntropy(
              mm, candidate_set, num_mv_samples=10, use_gumbel=False
          )
          self.assertEqual(qGIBBON(X).shape, torch.Size([1]))
  
          # test with X_pending is not None
          qGIBBON = qLowerBoundMaxValueEntropy(
              mm,
              candidate_set,
              num_mv_samples=10,
              use_gumbel=False,
              X_pending=torch.rand(
                  1, 2, device=self.device, dtype=dtype
              ),
          )
          self.assertEqual(qGIBBON(X).shape, torch.Size([1]))
  
          # Test with multi-output model w/ transform.
          mm = MESMockModel(num_outputs=2)
          pt = ScalarizedPosteriorTransform(
              weights=torch.ones(2, device=self.device, dtype=dtype)
          )
          qGIBBON = qLowerBoundMaxValueEntropy(
              mm,
              candidate_set,
              num_mv_samples=10,
              use_gumbel=False,
              X_pending=torch.rand(
                  1, 2, device=self.device, dtype=dtype
              ),
              posterior_transform=pt,
          )
          with self.assertRaisesRegex(
              UnsupportedError, "X_pending is not None"
          ):
              qGIBBON(X)
  
imports: from typing import Callable, Optional
  from unittest import mock
  import torch
  from botorch.acquisition.cost_aware import InverseCostWeightedUtility
  from botorch.acquisition.max_value_entropy_search import _sample_max_value_Gumbel, _sample_max_value_Thompson, qLowerBoundMaxValueEntropy, qMaxValueEntropy, qMultiFidelityLowerBoundMaxValueEntropy, qMultiFidelityMaxValueEntropy
  from botorch.acquisition.objective import PosteriorTransform, ScalarizedPosteriorTransform
  from botorch.exceptions.errors import UnsupportedError
  from botorch.posteriors import GPyTorchPosterior
  from botorch.sampling.normal import SobolQMCNormalSampler
  from botorch.utils.testing import BotorchTestCase, MockModel, MockPosterior
  from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal
  from torch import Tensor
label_desc: Use image node_id 2 for calling the TestMaxValueEntropySearch obj's underlying member method code with example usage: obj.test_q_lower_bound_max_value_entropy() without return types