code: def best_value(Y, sign=1):
      """
      Returns a vector whose components i are the minimum (default) or maximum of Y[:i]
      """
      n = Y.shape[0]
      Y_best = np.ones(n)
      for i in range(n):
          if sign == 1:
              Y_best[i] = Y[: (i + 1)].min()
          else:
              Y_best[i] = Y[: (i + 1)].max()
      return Y_best
  
file_path: GPyOpt/GPyOpt/util/general.py
imports: import numpy
  from scipy.special import erfc
  import time
  from ..core.errors import InvalidConfigError
label_desc: Use image node_id 9 for calling a global function with example usage: best_value(Y, sign) and returns: Y_best