code: def check_gradient_correctness(X_new, model, acq_func, y_opt):
      analytic_grad = gaussian_acquisition_1D(
          X_new, model, y_opt, acq_func
      )[1]
      num_grad_func = lambda x: gaussian_acquisition_1D(
          x, model, y_opt, acq_func=acq_func
      )[0]
      num_grad = optimize.approx_fprime(X_new, num_grad_func, 1e-5)
      assert_array_almost_equal(analytic_grad, num_grad, 3)
  
imports: import numpy
  import pytest
  from scipy import optimize
  from sklearn.multioutput import MultiOutputRegressor
  from numpy.testing import assert_array_almost_equal
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_raises
  from skopt.acquisition import _gaussian_acquisition
  from skopt.acquisition import gaussian_acquisition_1D
  from skopt.acquisition import gaussian_ei
  from skopt.acquisition import gaussian_lcb
  from skopt.acquisition import gaussian_pi
  from skopt.learning import GaussianProcessRegressor
  from skopt.learning.gaussian_process.kernels import Matern
  from skopt.learning.gaussian_process.kernels import WhiteKernel
  from skopt.space import Space
  from skopt.utils import cook_estimator
label_desc: Use image node_id 6 for calling a global function with example usage: check_gradient_correctness(X_new, model, acq_func, y_opt) without return types