code: def test_acq_with_poi():
      util = UtilityFunction(kind="poi", kappa=1.0, xi=1e-4)
      epsilon = 1e-2
      y_max = 2.0
  
      max_arg = acq_max(
          util.utility,
          GP,
          y_max,
          bounds=np.array([[0, 1], [0, 1]]),
          random_state=ensure_rng(0),
          n_iter=200,
      )
      _, brute_max_arg = brute_force_maximum(
          MESH, GP, kind="poi", kappa=1.0, xi=1e-4
      )
  
      assert all(abs(brute_max_arg - max_arg) < epsilon)
  
file_path: BayesianOptimization/tests/test_util.py
imports: import pytest
  import numpy
  from bayes_opt import BayesianOptimization
  from bayes_opt.util import UtilityFunction, Colours
  from bayes_opt.util import acq_max, load_logs, ensure_rng
  from sklearn.gaussian_process.kernels import Matern
  from sklearn.gaussian_process import GaussianProcessRegressor
  from scipy.optimize import NonlinearConstraint
  from pathlib import Path
label_desc: Use image node_id 6 for calling a global function with example usage: test_acq_with_poi() without return types