code: def test_mean_gradient():
      length_scale = np.arange(1, 6)
      X = rng.randn(10, 5)
      y = rng.randn(10)
      X_new = rng.randn(5)
  
      rbf = RBF(length_scale=length_scale, length_scale_bounds="fixed")
      gpr = GaussianProcessRegressor(rbf, random_state=0).fit(X, y)
  
      mean, std, mean_grad = gpr.predict(
          np.expand_dims(X_new, axis=0),
          return_std=True,
          return_cov=False,
          return_mean_grad=True,
      )
      num_grad = optimize.approx_fprime(
          X_new, lambda x: predict_wrapper(x, gpr)[0], 1e-4
      )
      assert_array_almost_equal(mean_grad, num_grad, decimal=3)
  
file_path: scikit-optimize/skopt/learning/gaussian_process/tests/test_gpr.py
imports: import numpy
  import pytest
  from scipy import optimize
  from numpy.testing import assert_almost_equal
  from numpy.testing import assert_array_almost_equal
  from numpy.testing import assert_array_equal
  from skopt.learning import GaussianProcessRegressor
  from skopt.learning.gaussian_process.kernels import RBF
  from skopt.learning.gaussian_process.kernels import Matern
  from skopt.learning.gaussian_process.kernels import WhiteKernel
  from skopt.learning.gaussian_process.gpr import _param_for_white_kernel_in_Sum
label_desc: Use image node_id 4 for calling a global function with example usage: test_mean_gradient() without return types