code: def brute_force_maximum(MESH, GP, kind="ucb", kappa=1.0, xi=1.0):
      uf = UtilityFunction(kind=kind, kappa=kappa, xi=xi)
  
      mesh_vals = uf.utility(MESH, GP, 2)
      max_val = mesh_vals.max()
      max_arg_val = MESH[np.argmax(mesh_vals)]
  
      return max_val, max_arg_val
  
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 2 for calling a global function with example usage: brute_force_maximum(MESH, GP, kind, kappa, xi) and returns: max_val,  max_arg_val