code: def _base_test_without_learned_objective(
      self,
      train_batch_shape: torch.Size,
      prune_baseline: bool,
      test_batch_shape: torch.Size,
  ) -> None:
      inputs = self._get_acqf_inputs(
          train_batch_shape=train_batch_shape, m=1
      )
      constraints = [lambda y: y[..., 0]]
      test_x = torch.rand(
          (*test_batch_shape, *train_batch_shape, self.q, self.d),
          **self.tkwargs,
      )
  
      input_constructor_kwargs = {
          "model": inputs["model"],
          "training_data": inputs["training_data"],
          "X_baseline": inputs["train_x"],
          "sampler": SobolQMCNormalSampler(torch.Size([4])),
      }
  
      for acqf_cls, kws in [
          (
              qNoisyExpectedImprovement,
              {"prune_baseline": prune_baseline},
          ),
          (
              qLogNoisyExpectedImprovement,
              {"prune_baseline": prune_baseline},
          ),
          (qExpectedImprovement, {}),
          (qProbabilityOfImprovement, {}),
          (qLogExpectedImprovement, {}),
      ]:
          # Not working.
          if (
              train_batch_shape.numel() > 1
              and acqf_cls == qLogExpectedImprovement
          ):
              continue
          input_constructor = get_acqf_input_constructor(
              acqf_cls=acqf_cls
          )
  
          with self.subTest(
              "no objective or constraints",
              train_batch_shape=train_batch_shape,
              prune_baseline=prune_baseline,
              test_batch_shape=test_batch_shape,
              acqf_cls=acqf_cls,
          ):
              acqf = acqf_cls(
                  **input_constructor(**input_constructor_kwargs, **kws)
              )
              acq_val = acqf(test_x)
              self.assertEqual(
                  acq_val.shape.numel(), test_x.shape[:-2].numel()
              )
  
          with self.subTest(
              "constrained",
              train_batch_shape=train_batch_shape,
              prune_baseline=prune_baseline,
              test_batch_shape=test_batch_shape,
              acqf_cls=acqf_cls,
          ):
              acqf = acqf_cls(
                  **input_constructor(
                      constraints=constraints,
                      **input_constructor_kwargs,
                      **kws,
                  )
              )
              self.assertEqual(
                  acq_val.shape.numel(), test_x.shape[:-2].numel()
              )
              acq_val = acqf(test_x)
  
imports: from itertools import product
  from typing import Dict
  from warnings import catch_warnings, simplefilter
  import torch
  from botorch.acquisition.input_constructors import get_acqf_input_constructor
  from botorch.acquisition.logei import qLogExpectedImprovement, qLogNoisyExpectedImprovement
  from botorch.acquisition.monte_carlo import qExpectedImprovement, qNoisyExpectedImprovement, qProbabilityOfImprovement
  from botorch.acquisition.objective import LearnedObjective
  from botorch.exceptions.warnings import InputDataWarning
  from botorch.fit import fit_gpytorch_mll
  from botorch.models import SingleTaskGP
  from botorch.sampling.normal import SobolQMCNormalSampler
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.testing import BotorchTestCase
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
label_desc: Use image node_id 7 for calling the TestObjectiveAndConstraintIntegration obj's underlying member method code with example usage: obj._base_test_without_learned_objective(train_batch_shape, prune_baseline, test_batch_shape) without return types