class_docstr: A function measuring the quality of input points as their expected
  improvement with respect to a conservative baseline. Expectations
  are according to the model from the previous BO step. See [moss2023ipa]_
  for details and justification.
docstr: Args:
      inputs: inputs (of shape n x d)
  
  Returns:
      A tensor of quality scores for each input, of shape [n]
docstr_tok: ["Args",":","inputs",":","inputs","(","of","shape","n","x","d",")","Returns",":","A","tensor","of","quality","scores","for","each","input",",","of","shape","[","n","]"]
code: def __call__(self, inputs: Tensor) -> Tensor:  # [n, d] -> [n]
      """
      Args:
          inputs: inputs (of shape n x d)
  
      Returns:
          A tensor of quality scores for each input, of shape [n]
      """
  
      posterior = self._model.posterior(inputs)
      mean = posterior.mean.squeeze(-2).squeeze(
          -1
      )  # removing redundant dimensions
      sigma = (
          posterior.variance.clamp_min(1e-12).sqrt().view(mean.shape)
      )
  
      best_f = torch.max(mean) if self._maximize else torch.min(mean)
      u = (
          (mean - best_f) / sigma
          if self._maximize
          else -(mean - best_f) / sigma
      )
      return sigma * (phi(u) + u * Phi(u))
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from typing import Union
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from botorch.models.model import Model
  from botorch.utils.probability.utils import ndtr, phi
  from gpytorch.module import Module
  from linear_operator.operators import LinearOperator
  from torch import Tensor
label_desc: Use image node_id 2 for calling the ExpectedImprovementQualityFunction obj's underlying member method code with example usage: obj.__call__(inputs) and returns: unknown