class_docstr: A class to compute different acquisition function values.
  
  Parameters
  ----------
  kind : string
      specification of utility function to use
  kappa : float
      parameter usedd for 'ucb' acquisition function
  xi : float
      parameter usedd for 'ei' and 'poi' acquisition function
docstr: return utility function
  
  Parameters
  ----------
  x : numpy array
      parameters
  gp : GaussianProcessRegressor
  y_max : float
      maximum target value observed so far
  
  Returns
  -------
  function
      return corresponding function, return None if parameter is illegal
code: def utility(self, x, gp, y_max):
      """
      return utility function
  
      Parameters
      ----------
      x : numpy array
          parameters
      gp : GaussianProcessRegressor
      y_max : float
          maximum target value observed so far
  
      Returns
      -------
      function
          return corresponding function, return None if parameter is illegal
      """
      if self._kind == "ucb":
          return self._ucb(x, gp, self._kappa)
      if self._kind == "ei":
          return self._ei(x, gp, y_max, self._xi)
      if self._kind == "poi":
          return self._poi(x, gp, y_max, self._xi)
      return None
  
file_path: nni/nni/algorithms/hpo/gp_tuner/util.py
imports: import warnings
  import numpy
  from scipy.stats import norm
  from scipy.optimize import minimize
label_desc: Use image node_id 2 for calling the UtilityFunction obj's underlying member method code with example usage: obj.utility(x, gp, y_max) and returns: None, self, self, self