code: def test_returns_correct_shape(self):
      train_X = torch.rand(15, 1, device=self.device)
      for maximize in [True, False]:
          quality_function = ExpectedImprovementQualityFunction(
              self.previous_model, maximize=maximize
          )
          scores = quality_function(train_X)
          self.assertEqual(scores.shape, torch.Size([15]))
  
imports: import gc
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.approximate_gp import SingleTaskVariationalGP
  from botorch.models.utils.inducing_point_allocators import _pivoted_cholesky_init, ExpectedImprovementQualityFunction, GreedyImprovementReduction, GreedyVarianceReduction, UnitQualityFunction
  from botorch.utils.testing import BotorchTestCase
  from gpytorch.kernels import MaternKernel, ScaleKernel
  from gpytorch.likelihoods import GaussianLikelihood
  from gpytorch.mlls import VariationalELBO
label_desc: Use image node_id 2 for calling the TestExpectedImprovementQualityFunction obj's underlying member method code with example usage: obj.test_returns_correct_shape() without return types